Unable to convert the tensorflow model to tflite

Viewed 218

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).

1 Answers

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

Related