Toybrick

加载onnx框架下的lstm网络报错

cfan

注册会员

积分
182
发表于 2021-4-14 10:10:49    查看: 311|回复: 0 | [复制链接]    打印 | 显示全部楼层
环境:rknn-toolkit-1.6.0 docker
在加载onnx LSTM模型时报错,log如下:

D Save log info to: ./build.log
I Start importing onnx...
W Call onnx.optimizer.optimize fail, skip optimize
I Current ONNX Model use ir_version 6 opset_version 9
D Calc tensor Constant_12 ()
D Calc tensor Shape_11 (3,)
D Calc tensor Gather_13 val: 1
D Calc tensor Unsqueeze_17 (1,)
D Calc tensor Unsqueeze_24 (1,)
D Calc tensor Transpose_28 (28, 1, 28)
D Calc tensor Initializer_129 (1, 512)
D Calc tensor Initializer_128 (1, 256, 64)
D Calc tensor Initializer_127 (1, 256, 64)
D Calc tensor Initializer_109 (1, 512)
D Calc tensor Initializer_108 (1, 256, 64)
D Calc tensor Initializer_107 (1, 256, 28)
D Calc tensor Initializer_89 (1,)
D Calc tensor Initializer_88 (1,)
D Calc tensor Concat_26 (3,)
D Calc tensor ConstantOfShape_27 (2, 1, 64)
D Calc tensor Slice_51 (1, 1, 64)
D Calc tensor Slice_77 (1, 1, 64)
D Calc tensor Initializer_87 (1,)
D Calc tensor Initializer_86 (1,)
D Calc tensor Concat_19 (3,)
D Calc tensor ConstantOfShape_20 (2, 1, 64)
D Calc tensor Slice_50 (1, 1, 64)
D Calc tensor LSTM_52 (28, 1, 1, 64)
D Calc tensor LSTM_53 (1, 1, 64)
D Calc tensor LSTM_54 (1, 1, 64)
D Calc tensor Squeeze_55 (28, 1, 64)
D Calc tensor Slice_76 (1, 1, 64)
D Calc tensor LSTM_78 (28, 1, 1, 64)
D Calc tensor LSTM_79 (1, 1, 64)
D Calc tensor LSTM_80 (1, 1, 64)
D Calc tensor Squeeze_81 (28, 1, 64)
D Calc tensor Transpose_82 (1, 28, 64)
D Calc tensor Slice_83 (1, 1, 64)
D Calc tensor Squeeze_84 (1, 64)
D Calc tensor Initializer_linear.bias (10,)
D Calc tensor Initializer_linear.weight (10, 64)
D Calc tensor Gemm_output_1 (1, 10)
D import clients finished
I build output layer attach_Gemm_Gemm_21ut0
I Try match Gemm_Gemm_21ut0
I Match r_gemm_2_fc_wb [['Gemm_Gemm_21', 'Initializer_linear.weight', 'Initializer_linear.bias']] [['Gemm', 'Constant_0', 'Constant_1']] to [['fullconnect']]
I Try match Squeeze_Squeeze_20ut0
I Match r_squeeze [['Squeeze_Squeeze_20']] [['Squeeze']] to [['squeeze']]
I Try match Slice_Slice_19ut0
I Match r_slice_axes [['Slice_Slice_19']] [['Slice']] to [['slice']]
I Try match Transpose_Transpose_18ut0
I Match r_transpose [['Transpose_Transpose_18']] [['Transpose']] to [['permute']]
I Try match Squeeze_Squeeze_17ut0
I Match r_squeeze [['Squeeze_Squeeze_17']] [['Squeeze']] to [['squeeze']]
I Try match LSTM_LSTM_16ut0
W Not match tensor LSTM_LSTM_16ut0
E Try match LSTM_LSTM_16ut0 failed, catch exception!
W ----------------Warning(2)----------------
E Catch exception when loading onnx model: ./test.onnx!
E Traceback (most recent call last):
E   File "rknn/base/RKNNlib/converter/convert_onnx.py", line 826, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.match_paragraph_and_param
E   File "rknn/base/RKNNlib/converter/convert_onnx.py", line 728, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx._onnx_push_ready_tensor
E TypeError: 'NoneType' object is not iterable
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E   File "rknn/api/rknn_base.py", line 264, in rknn.api.rknn_base.RKNNBase.load_onnx
E   File "rknn/base/RKNNlib/RK_nn.py", line 135, in rknn.base.RKNNlib.RK_nn.RKnn.load_onnx
E   File "rknn/base/RKNNlib/app/importer/import_onnx.py", line 121, in rknn.base.RKNNlib.app.importer.import_onnx.Importonnx.run
E   File "rknn/base/RKNNlib/converter/convert_onnx.py", line 832, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.match_paragraph_and_param
E   File "rknn/api/rknn_log.py", line 312, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Try match LSTM_LSTM_16ut0 failed, catch exception!



请教下各位大佬这种错误该怎么解决?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表