rockchip-linux / rknn-toolkit

BSD 3-Clause "New" or "Revised" License
831 stars 175 forks source link

slice indices must be integers or None or have an __index__ method #444

Open cv-on-device opened 8 months ago

cv-on-device commented 8 months ago

Hi, I find error as follow, for yolov8m.onnx E Calc node Slice : /model.22/Slice output shape fail E Catch exception when loading onnx model: yolov8m.onnx! E Traceback (most recent call last): E File "rknn/base/RKNNlib/onnx_ir/onnx_numpy_backend/shape_inference.py", line 65, in rknn.base.RKNNlib.onnx_ir.onnx_numpy_backend.shape_inference.infer_shape E File "rknn/base/RKNNlib/onnx_ir/onnx_numpy_backend/ops/slice.py", line 41, in rknn.base.RKNNlib.onnx_ir.onnx_numpy_backend.ops.slice.Slice E File "<string>", line 1, in <module> E TypeError: slice indices must be integers or None or have an __index__ method E During handling of the above exception, another exception occurred: E Traceback (most recent call last): E File "rknn/base/RKNNlib/app/importer/import_onnx.py", line 120, in rknn.base.RKNNlib.app.importer.import_onnx.Importonnx.run E File "rknn/base/RKNNlib/converter/convert_onnx.py", line 123, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx.__init__ E File "rknn/base/RKNNlib/converter/convert_onnx.py", line 1187, in rknn.base.RKNNlib.converter.convert_onnx.convert_onnx._shape_inference E File "rknn/base/RKNNlib/onnx_ir/onnx_numpy_backend/shape_inference.py", line 70, in rknn.base.RKNNlib.onnx_ir.onnx_numpy_backend.shape_inference.infer_shape E File "rknn/api/rknn_log.py", line 323, in rknn.api.rknn_log.RKNNLog.e E ValueError: Calc node Slice : /model.22/Slice output shape fail 123456