Toybrick

标题: 由onnx格式转为rknn格式报"AttributeError: 'NoneType' object has no att... [打印本页]

作者: flybod    时间: 2020-11-12 14:37
标题: 由onnx格式转为rknn格式报"AttributeError: 'NoneType' object has no att...
目前我们利用paddlex算法训练的模型,算法训练好后,我们利用paddle2onnx包进行了模型转换,转为onnx格式。目前在由onnx格式转为rknn格式的过程中一直报错,报错信息如下:

T Traceback (most recent call last):
T File "rknn/api/rknn_base.py", line 344, in rknn.api.rknn_base.RKNNBase.load_onnx
T File "rknn/base/RKNNlib/converter/convert_onnx.py", line 523, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__
T File "rknn/base/RKNNlib/converter/convert_onnx.py", line 529, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__
T File "rknn/base/RKNNlib/converter/onnx_util.py", line 158, in rknn.base.RKNNlib.converter.onnx_util.ONNXProto_Util.polishing_model
T File "/Users/song.li/anaconda3/envs/pythonLearn/lib/python3.6/site-packages/onnx/utils.py", line 18, in polish_model
T onnx.checker.check_model(model)
T File "/Users/song.li/anaconda3/envs/pythonLearn/lib/python3.6/site-packages/onnx/checker.py", line 86, in check_model
T C.check_model(model.SerializeToString())
T onnx.onnx_cpp2py_export.checker.ValidationError: Your model ir_version is higher than the checker's.
done
--> Building model
Traceback (most recent call last):
File "rknn_build.py", line 35, in <module>
rknn.build(do_quantization=False)
File "/Users/song.li/anaconda3/envs/pythonLearn/lib/python3.6/site-packages/rknn/api/rknn.py", line 163, in build
inputs = self.rknn_base.net.get_input_layers()
AttributeError: 'NoneType' object has no attribute 'get_input_layers'

我们目前使用的版本信息如下:

tensorflow 1.14.0,
rknn_toolkit-1.2.0 ( rknn_toolkit-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl )
paddle2onnx 0. 4

请教相应的解决方法。谢谢!



作者: Zzh    时间: 2020-12-11 15:51
你好,遇到了同样的问题,请问有解决方法吗?
作者: zzy178638    时间: 2020-12-11 23:34
你好,我也遇到了上述问题,求解答~
作者: Ross    时间: 2023-4-14 15:56
请问有人解决了吗,遇到同样的问题




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3