标题: pytorch 转 onnx 再转 rknn 报错 [打印本页] 作者: kkkaaa 时间: 2020-4-21 16:49 标题: pytorch 转 onnx 再转 rknn 报错 从 pytorch 转出来的 onnx 模型通过 onnx.checker.check_model(onnx_model) 没有报错
但是把 onnx 模型转 rknn 模型时报错:
E Catch exception when loading onnx model: /data01/wens/workspace/project/Yet-Another-EfficientDet-Pytorch/weights/efficientdet_d0.onnx!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 510, in rknn.api.rknn_base.RKNNBase.load_onnx
E File "rknn/base/RKNNlib/converter/convert_onnx.py", line 494, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__
E File "rknn/base/RKNNlib/converter/convert_onnx.py", line 504, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__
E File "rknn/base/RKNNlib/converter/onnx_util.py", line 158, in rknn.base.RKNNlib.converter.onnx_util.ONNXProto_Util.polishing_model
E File "/data01/wens/venv/rknn/lib/python3.6/site-packages/onnx/utils.py", line 18, in polish_model
E onnx.checker.check_model(model)
E File "/data01/wens/venv/rknn/lib/python3.6/site-packages/onnx/checker.py", line 86, in check_model
E C.check_model(model.SerializeToString())
E onnx.onnx_cpp2py_export.checker.ValidationError: Field 'shape' of type is required but missing.