标题: PB 模型转换RKNN 问题 [打印本页] 作者: wenzhu 时间: 2021-6-30 19:24 标题: PB 模型转换RKNN 问题 python3 test.py
--> Loading model
W:tensorflow:From /home/tf/anaconda3/envs/rk1808_TFV1/lib/python3.6/site-packages/rknn/api/rknn.py:75: The name tf.GraphDef is deprecated. Please use tf.compat.v1.GraphDef instead.
W:tensorflow:From /home/tf/anaconda3/envs/rk1808_TFV1/lib/python3.6/site-packages/rknn/api/rknn.py:75: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.extract_sub_graph`
W:tensorflow:From /home/tf/anaconda3/envs/rk1808_TFV1/lib/python3.6/site-packages/rknn/api/rknn.py:75: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
W:tensorflow:From /home/tf/anaconda3/envs/rk1808_TFV1/lib/python3.6/site-packages/rknn/api/rknn.py:75: The name tf.global_variables_initializer is deprecated. Please use tf.compat.v1.global_variables_initializer instead.
E Unknow layer "tensorarraygatherv3"
E Try match TensorArrayGatherV3 Postprocessor/BatchMultiClassNonMaxSuppression/map/TensorArrayStack/TensorArrayGatherV3 failed, catch exception!
E Catch exception when loading tensorflow model: 2_28.pb!
E Traceback (most recent call last):
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 750, in rknn.base.RKNNlib.converter.convert_tf.convert_tf.match_paragraph_and_param
E File "rknn/base/RKNNlib/RKNNnet.py", line 211, 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 209, in rknn.api.rknn_base.RKNNBase.load_tensorflow
E File "rknn/base/RKNNlib/RK_nn.py", line 47, in rknn.base.RKNNlib.RK_nn.RKnn.load_tensorflow
E File "rknn/base/RKNNlib/app/importer/import_tensorflow.py", line 232, in rknn.base.RKNNlib.app.importer.import_tensorflow.Importensorflow.run
E File "rknn/base/RKNNlib/converter/convert_tf.py", line 849, 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 "test.py", line 33, in <module>
rknn.build(do_quantization=False)
File "/home/tf/anaconda3/envs/rk1808_TFV1/lib/python3.6/site-packages/rknn/api/rknn.py", line 228, in build
inputs = self.rknn_base.net.get_input_layers()
AttributeError: 'NoneType' object has no attribute 'get_input_layers'