INTERNAL ERROR: Value of zero not correct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 12:44 AM
Hello, everyone! I'm learning to deploy my target detection model using cubeai. My model is trained using pytorch and I found that cubeai doesn't support .pth file conversion so I'm trying to convert my model to onnx format. Since the size of my model did not match the requirements of the development board, I performed a quantization operation. Noting that cubeai officially recommends quantization in onnx format, I did so. However, when I analyze the model with cubeai, the following error occurs (the model before quantization can be analyzed normally). Can anyone help me to see what's going on?
Solved! Go to Solution.
- Labels:
-
STM32CubeAI
-
STM32CubeMX
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-10-29 8:20 AM - edited ‎2024-10-29 8:30 AM
FYI, the fix for this model will be available in the December 2024 release
Regards
Daniel
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 12:46 AM
By the way, quantized onnx models are normal to run with onnxruntime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 3:13 AM
STM32Cube.AI supports ONNX quantization in QDQ format per channel and INT8.
You can look in the embedded documentation in the quantization chapter for sample script using ONNX.
That said could you share the model with us so we could analyze what's going on.
Thanks
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 3:13 AM
Oops, I didn't see that the model was attached
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 3:20 AM - edited ‎2024-02-26 3:21 AM
Aha, thank you very much for your reply, that's exactly the procedure I refer to in the quantization section of the embedded documentation for the quantization process. My model works fine with onnxruntime.InferenceSession. Attached is a test image
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 3:33 AM
I tried to quantized with the STM32Cube.AI Developer Cloud also and I ran into a similar error of inconsistent shape of Bias.
I've created a bug for the dev team
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 4:12 AM - edited ‎2024-02-26 4:33 AM
So this error is a cubeai problem? Is there a solution, or will there be one in the near future? I need to move forward with this demo as soon as possible for a report.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 5:18 AM
It is likely a problem in CubeAI in the way we interpret the shape of the bias.
Regards
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-26 5:24 AM
Do you have any alternative? Or what would you recommend I do to avoid this problem?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-02-28 6:05 PM
Hello, @fauvarque.daniel Has this problem been solved, please? Or what other things would you recommend I try? Looking forward to your reply! Thanks.
