简体   繁体   中英

Unable to convert the tensorflow model to tflite

Input size of the tensor does not matching the output size of the tensor

I have executed the following in command prompt

tflite_convert /
 --output_file=C:\Users\TS-PC04\Desktop\toutput.tflite /
--graph_def_file=C:\Users\TS-PC04\Desktop\t.pb /
 --input_shape=1,513,513,3 /
 --input_arrays=ImageTensor /
 --output_arrays=SemanticPredictions

The error I am getting is Check failed: input_shape.dims().size() == op->size.size() (4 vs. 3).

pip install --upgrade tensorflow .
This works for me and I am successfully converting .pb to .tflite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM