How do i know my --output_arrays in tflite_convert

我与影子孤独终老i 提交于 2020-07-21 18:44:08

问题


I'm trying to convert my .pb to .tflite using tflite_convert

How do i know my --output_arrays ?

I'm using the ssd_mobilenet_v2_coco_2018_03_29

this is my current code:

tflite_convert --output_file=C:/tensorflow1/models/research/object_detection/inference_graph/detect.tflite --graph_def_file=C:/tensorflow1/models/research/object_detection/inference_graph/tflite_graph.pb --inference_type=FLOAT --inference_input_type=QUANTIZED_UINT8 --input_arrays=ImageTensor --input_shapes=1,513,513,3 --output_arrays=SemanticPredictions --mean_values=128 --std_dev_values=128 --allow_custom_ops

and it produce error:

Specified output array "SemanticPredictions" is not produced by any op in this graph.

Following from https://www.tensorflow.org/lite/convert/cmdline_examples#command-line_tools_


回答1:


One option is to use Netron for visualizing your graph.

Clicking on a particular layer gives its name, which in this case is: ** MobilenetV1/Predictions/Softmax**

I hope it helps:)



来源:https://stackoverflow.com/questions/58793386/how-do-i-know-my-output-arrays-in-tflite-convert

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!