从冻结图.pb文件到tflite文件的转换

时间:2019-05-31 23:05:14

标签: tensorflow tensorflow-lite

我正在尝试下面提到的脚本将我的.pb文件转换为tflite文件:

tflite_convert 
  --output_file= training/frozen_inference_graph.tflite 
  --graph_def_file=frozen_inference_graph.pb 
  --input_arrays=image_tensor 
  --output_arrays=raw_detection_scores 
  --input_shape=1,300,300,3

我为input_shape尝试了多个值,但没有任何作用。

ConverterError: TOCO failed. See console for info.
2019-05-31 22:31:26.123055: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayV3
2019-05-31 22:31:26.132236: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.132318: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayScatterV3
2019-05-31 22:31:26.132341: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayV3
2019-05-31 22:31:26.132352: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.132361: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayV3
2019-05-31 22:31:26.132369: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.132379: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132392: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132405: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132417: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132486: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132500: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: LoopCond
2019-05-31 22:31:26.132527: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132553: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.132566: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.132578: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayReadV3
.
.
.
2019-05-31 22:31:26.170120: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayScatterV3
2019-05-31 22:31:26.170163: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayScatterV3
2019-05-31 22:31:26.170186: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayV3
2019-05-31 22:31:26.170201: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.170221: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170239: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170256: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170278: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170298: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: LoopCond
2019-05-31 22:31:26.170329: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170343: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.170357: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170372: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayReadV3
2019-05-31 22:31:26.170388: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170406: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.170420: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170435: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayReadV3
2019-05-31 22:31:26.170552: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Enter
2019-05-31 22:31:26.170568: I tensorflow/lite/toco/import_tensorflow.cc:193] Unsupported data type in placeholder op: 20
2019-05-31 22:31:26.170580: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayWriteV3
2019-05-31 22:31:26.170604: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: Exit
2019-05-31 22:31:26.170627: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArraySizeV3
2019-05-31 22:31:26.170663: I tensorflow/lite/toco/import_tensorflow.cc:1324] Converting unsupported operation: TensorArrayGatherV3
2019-05-31 22:31:26.215849: I tensorflow/lite/toco/graph_transformations/graph_transformations.cc:39] Before Removing unused ops: 1988 operators, 3357 arrays (0 quantized)
2019-05-31 22:31:26.262318: I tensorflow/lite/toco/graph_transformations/graph_transformations.cc:39] After Removing unused ops pass 1: 1433 operators, 2340 arrays (0 quantized)
2019-05-31 22:31:26.304906: I tensorflow/lite/toco/graph_transformations/graph_transformations.cc:39] Before general graph transformations: 1433 operators, 2340 arrays (0 quantized)
2019-05-31 22:31:26.345692: F tensorflow/lite/toco/graph_transformations/resolve_constant_slice.cc:59] Check failed: dim_size >= 1 (0 vs. 1)
Aborted (core dumped)

链接到冻结图.pb文件-https://drive.google.com/open?id=1G5gG3ZJBXvoB2iN2asJRqSI0hWLhikzh

0 个答案:

没有答案