kendryte / nncase

Open deep learning compiler stack for Kendryte AI accelerators ✨
Apache License 2.0
750 stars 182 forks source link

Fatal: Shape and data size don't match #293

Closed ChengzhenDu closed 2 years ago

ChengzhenDu commented 3 years ago

Describe the bug 在执行以下命令之后 ncc.exe compile yolo.onnx yolo.kmodel -i onnx -t k210 --dataset train_img

出现报错: Fatal: Shape and data size don't match

注:yolo.onnx文件是由yolov5s模型的pt格式权重文件转换而来。

Environment (please complete the following information):

Additional context model.zip train_img图片集未知原因不能上传 train_img 中共有181张jpg格式的图片,分辨率为1920*1080

aclex commented 3 years ago

Done a small investigation, according to git bisect it started happening after f339f92af6a2b921f15a57c9b978a8935c9144fb, probably due to changes in src/importer/onnx/ops/constant.cpp.

zhangyang2057 commented 3 years ago
  1. This is a constant bug, which will be fixed at https://github.com/kendryte/nncase/pull/295
  2. You'd better use onnxsim to simplify your onnx model before using ncc.
zhangyang2057 commented 2 years ago

Is there any update?

aclex commented 2 years ago

I think, it happened to work for me after the update you've mentioned, so I consider it solved now.

zhangyang2057 commented 2 years ago

No response for a long time. Close it.