cancel
Showing results for 
Search instead for 
Did you mean: 

Analyzing .onnx model: TOOL ERROR: need more than 2 values to unpack

casperbroch
Associate

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.

1 REPLY 1
Julian E.
ST Employee

Hello @casperbroch,

 

After investigation, it seems to be a bug on our side. I opened a ticket for the dev team.

I will keep you updated when I get news but it will probably take time.

 

Have a good day,

Julian


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.