|
本帖最后由 superbc 于 2020-8-26 10:25 编辑
环境:debian10,tensorflow 1.14,rknn-toolkit 1.4.0
转换模型:自己用数据训练的SSD_mobilenetV1模型
转换代码:
rknn.load_tensorflow(tf_pb='./frozen_inference_graph.pb',
inputs=['image_tensor'],
outputs=['num_detections', 'detection_boxes', 'detection_scores','detection_classes'],
input_size_list=[[INPUT_SIZE, INPUT_SIZE, 3]])
报错信息:
E Unknow layer "tensorarraygatherv3"
E Try match TensorArrayGatherV3 Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayStack/TensorArrayGatherV3 failed, catch exception!
E Catch exception when loading tensorflow model: ./frozen_inference_graph.pb!
E Traceback (most recent call last):
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 668, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
E File "rknn/base/RKNNlib/RKNNnet.py", line 189, in rknn.base.RKNNlib.RKNNnet.RKNNNet.new_layer
E File "rknn/api/rknn_log.py", line 312, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Unknow layer "tensorarraygatherv3"
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 374, in rknn.api.rknn_base.RKNNBase.load_tensorflow
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 767, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
E File "rknn/api/rknn_log.py", line 312, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Try match TensorArrayGatherV3 Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayStack/TensorArrayGatherV3 failed, catch exception!
done
--> Building model
Traceback (most recent call last):
File "main.py", line 37, in transfer_rknn
rknn.build(do_quantization=False)
File "/home/zmlq/.local/lib/python3.7/site-packages/rknn/api/rknn.py", line 231, in build
inputs = self.rknn_base.net.get_input_layers()
AttributeError: 'NoneType' object has no attribute 'get_input_layers'
|
|