Analyzing .onnx model: TOOL ERROR: need more than 2 values to unpack
- January 7, 2025
- 1 reply
- 623 views
Hello,
I have a very similair problem as my last forum post, so here I go again. I tried the fix that worked last time (quantizing using ST AI Developer Cloud), but this didn't fix it this time. The problem:
I have a large .onnx model which, untouched, I’m unable to analyze on the ST AI Developer Cloud. After quantizing this larger model using the online ST AI Developer Cloud tool, I now receive the following error when running the analyze command with X-CUBE-AI (I also get this when I try to "Optimize" this quantized model on the ST AI Dev Cloud):
>> stedgeai analyze --model anchornet_PerChannel_quant_random_1.onnx --allocate-inputs --allocate-outputs --optimization balanced --target stm32f4 --name network --workspace workspace --output output
ST Edge AI Core v1.0.0-19894
TOOL ERROR: need more than 2 values to unpack
Strangely, the original (unquantized) model can still be analyzed successfully, so it seems the quantization step introduced a change that X-CUBE-AI doesn’t handle correctly. The quantized model otherwise appears to work fine—I tested it in Python using ONNX Runtime and random inputs without any issues.
Has anyone encountered this “need more than 2 values to unpack” error after quantizing via the online ST AI Developer Cloud tool? Any guidance on how to fix or work around this issue would be much appreciated. I have attached both the original, larger model and the quantized model to this post.
