2024-06-11
12:28 AM
- last edited on
2024-06-11
03:32 AM
by
Lina_DABASINSKA
Hi,
I am trying to deploy a pytorch deep learning to stm32. I first converted it to an onnx model and after that verified it in STM32Cube.AI Developer Cloud and in the middle step of optimize it reported the following error.
stm32ai analyze --model trans_model_8.onnx --allocate-inputs --allocate-outputs --compression none --optimization balanced --target stm32f4 --name network --workspace workspace --output output STEdgeAI Core v9.0.0-19802 INTERNAL ERROR: Mismatch in input shape of gemm: (BATCH: 1, CH : 12, H: 8 ) x (BATCH: 1, CH: 8, H: 12)
When I look at the model visualization in netron I see that the gemm operation is only present in the last linear layer, but that operation is converting 1x702 data to 1x2. I don't know if there's something I'm missing.Would be great if you could assist me in resolving this issue.
Thank you!
2024-07-17 03:27 AM
Please share your model.
Also it maybe worth trying with onnx 1.15 (not a more recent one) to see if you have the same issue.
2024-08-15 07:00 PM