我怎么知道我在 tflite_convert 中的 --output_arrays [英] How do i know my --output_arrays in tflite_convert

查看:102
本文介绍了我怎么知道我在 tflite_convert 中的 --output_arrays的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 tflite_convert 将我的 .pb 转换为 .tflite

我怎么知道我的 --output_arrays ?

我正在使用 ssd_mobilenet_v2_coco_2018_03_29

这是我当前的代码:

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

它产生错误:

<块引用>

指定的输出数组SemanticPredictions"不是由该图中的任何操作产生的.

以下

单击特定层会给出其名称,在本例中为:** MobilenetV1/Predictions/Softmax**

希望有帮助:)

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_

解决方案

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

这篇关于我怎么知道我在 tflite_convert 中的 --output_arrays的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆