Convert Tensorflow model into Tensorflow Lite

Viewed 482

I have a problem with the conversion of the tensorflow model to tflite. I have a learned model based on Tensorflow Object Detection I would like to use the conversion code from TFlite converter

curl https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_0.50_128_frozen.tgz | tar xzv -C /tmp

tflite_convert \
 --output_file=/tmp/foo.tflite \
 --graph_def_file=/tmp/mobilenet_v1_0.50_128/frozen_graph.pb \
 --input_arrays=input \
 --output_arrays=MobilenetV1/Predictions/Reshape_1

I do not know where to get value of input_arrays and output_arrays.

Thanks for the answers

3 Answers

We have a script in the Object Detection API to get the Flatbuffer.

If you download the model from here then there will be a file mobilenet_v1_0.5_128_info.txt which states the input and output name

Model: mobilenet_v1_0.5_128
Input: input
Output: MobilenetV1/Predictions/Reshape_1
Related