标题: Nanodet模型onnx转rknn报错Loading dynamic inputs model is not support [打印本页] 作者: cxr 时间: 2022-3-14 17:12 标题: Nanodet模型onnx转rknn报错Loading dynamic inputs model is not support 本帖最后由 cxr 于 2022-3-14 19:22 编辑
py=3.6 rknntoolket=1.7.1
使用1.6.0版本报错 报错内容: --> Config model done --> Loading model W Not match tensor Slice_Slice_355:out0 E Try match Slice_Slice_355:out0 failed, catch exception! W ----------------Warning(1)---------------- E Catch exception when loading onnx model: nanodet_sim.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 Slice_Slice_355:out0 failed, catch exception! Load failed!
Process finished with exit code -1
使用1.7.1版本报错 --> Config model
done
--> Loading model
W Detect Input node:1325 is dynamic input, the shape info is [0]
W Use the follow command to see more detail and try to fix the dynamic dim
W python -m rknn.bin.freeze_inshape_for_onnx_model -h
E Loading dynamic inputs model is not support, please fix it first
E Catch exception when loading onnx model: nanodet_sim.onnx!
E Traceback (most recent call last):
E File "rknn\base\RKNNlib\RK_nn.py", line 141, in rknn.base.RKNNlib.RK_nn.RKnn.load_onnx
E File "rknn\base\RKNNlib\app\importer\import_onnx.py", line 118, in rknn.base.RKNNlib.app.importer.import_onnx.Importonnx.run
E File "rknn\base\RKNNlib\converter\convert_onnx.py", line 68, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__
E File "rknn\base\RKNNlib\converter\convert_onnx.py", line 73, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__
E File "rknn\api\rknn_log.py", line 323, in rknn.api.rknn_log.RKNNLog.e
E ValueError: Loading dynamic inputs model is not support, please fix it first
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
Load failed!
Traceback (most recent call last):
File "freeze_inshape_for_onnx_model.py", line 116, in <module>
state = fdt.run()
File "freeze_inshape_for_onnx_model.py", line 72, in run
dynamic_input = self.check_dynamic_input()
File "freeze_inshape_for_onnx_model.py", line 37, in check_dynamic_input
assert inputs_number==len(self.inputs_shape),"model has {} inputs, but {} inputs_shape was given, not match".format(inputs_number,len(self.inputs_shape
))
AssertionError: model has 236 inputs, but 2 inputs_shape was given, not match