cancel
Showing results for 
Search instead for 
Did you mean: 

TOOL ERROR: Unknown layer type SHAPE, stopping.

MKiss
Associate II

Dear STM community,

I am trying to deploy a simple tflite model on my STM32, but I can't get through the analyze step. I got the following error:

TOOL ERROR: Unknown layer type SHAPE, stopping.

If I convert the model to Keras (model and topology), it works fine, I can run the generated code, but I want to use tflite model.

I attached the keras and the tflite files.

Thanks,

Titusz

1 ACCEPTED SOLUTION

Accepted Solutions
JChen.10
Associate

You have a SHAPE layer in your model, which is not currently supported in X-CUBE-AI. Shape layers extract the shape of tensors, so check your model if you use any .shape operation when building your model graph, and you can use Netron to exam your model graph.0693W000003CBCJQA4.png

You can look up supported layer types in official documents located in %USERPROFILE%/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/5.1.2/Documentation/layer-support.html

View solution in original post

5 REPLIES 5
JChen.10
Associate

You have a SHAPE layer in your model, which is not currently supported in X-CUBE-AI. Shape layers extract the shape of tensors, so check your model if you use any .shape operation when building your model graph, and you can use Netron to exam your model graph.0693W000003CBCJQA4.png

You can look up supported layer types in official documents located in %USERPROFILE%/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/5.1.2/Documentation/layer-support.html

MKiss
Associate II

Thank you for your answer, it helps me a lot! 😉

AH.5
Associate

I was facing the same error, how did you get around it? Is there any alternative to .shape?

MKiss
Associate II

I'm so sorry, I can't help you, because it wasn't a top priority project and we stopped working on it.

Sure, thanks for the reply.