cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when verifying ONNX model with STM32Cube.AI 7.2.0 (Not IMPLEMENTED: Squeeze: Selected axis has shape entry not equal to 1)

HZhao.3
Associate

0693W00000QOIcjQAH.pngDear support-team:

I've created a model which consists of only a LSTM layer and a linear layer with Pytorch, and convert it into ONNX model. But when I tried to verify it with STM32Cube.AI, it just print "Not IMPLEMENTED: Squeeze: Selected axis has shape entry not equal to 1". As I've checked the model, the shape entry which I try to squeeze is 1, what may the cause the problem? Sincerely for your help.

Pytorch version: 1.8.2

ONNX version: 1.10.0 (With Opset 10)

STM32Cube.AI version: 7.2.0

1 REPLY 1
fauvarque.daniel
ST Employee

Thanks for reporting this issue,

We had an issue with this model due to the insertion of a Transpose layer before and after the LSTM. This determines a wrong shape inference for the successive layers depending on axes (e.g. Squeeze).

We have fixed the problem in our upcoming 7.3 version that will be public by beginning of October


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.