cancel
Showing results for 
Search instead for 
Did you mean: 

X-Cube-AI: Can't analyze model

JSGraaf
Associate II

I'm trying to convert the BirdNET-Analyzer (https://github.com/kahst/BirdNET-Analyzer/tree/main) model to run on a STM32U5A5. However, both the TFLite and STM32Cube.AI MCU Runtime fail.


The TFLite runtime fails with:
Operator REDUCE_MIN not supported
 

The STM32Cube.AI MCU Runtime fails with: 
INTERNAL ERROR: Invalid size_splits configuration: [1 1 0]

 

As I'm by no means a ML expert, I was wondering how to fix these conversion issues. I've tried to convert the TF SavedModel (.pb) to a .tflite model with the TFLiteConverter in python with the following enabled:

 

 

converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS]

 

 

However, this gives no warning and converts the model with a REDUCE_MIN operation.  I haven't been able to find any information to mitigate the STM32Cube.AI MCU error. 

 

I'm on the latest STM32Cube.AI package in CubeIDE (v10.0.0) and Tensorflow V2.18.0.

 

Any help is very appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions
Julian E.
ST Employee

Hello @JSGraaf,

 

This INTERNAL ERROR: Invalid size_splits configuration: [1 1 0] is due to the last element of size 0. The split is splitting your input into 2 element of size1 and one of size 0. Which is causing the issue.

JulianE_0-1738765242777.png

 

If you manage to solve this, the model should pass through STM32CubeAI.

 

That being said, I took a look at the github repository and I saw this:

  • 0.826 GFLOPs, 50.5 MB as FP32

I am pretty sure that this will never run even on a STM32U5A5 or even on STM32H7. 

Maybe on a STM32N6 but even for this, I a not sure...

 

I don't know what kind of project you exactly want to try, but as it seems related to classifying sound, you may be interested by our ST model zoo that provide models and script to retrain these model on your datasets:

https://github.com/STMicroelectronics/stm32ai-modelzoo 

 In particular, audio even detection.

 

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.

View solution in original post

2 REPLIES 2
Julian E.
ST Employee

Hello @JSGraaf,

 

This INTERNAL ERROR: Invalid size_splits configuration: [1 1 0] is due to the last element of size 0. The split is splitting your input into 2 element of size1 and one of size 0. Which is causing the issue.

JulianE_0-1738765242777.png

 

If you manage to solve this, the model should pass through STM32CubeAI.

 

That being said, I took a look at the github repository and I saw this:

  • 0.826 GFLOPs, 50.5 MB as FP32

I am pretty sure that this will never run even on a STM32U5A5 or even on STM32H7. 

Maybe on a STM32N6 but even for this, I a not sure...

 

I don't know what kind of project you exactly want to try, but as it seems related to classifying sound, you may be interested by our ST model zoo that provide models and script to retrain these model on your datasets:

https://github.com/STMicroelectronics/stm32ai-modelzoo 

 In particular, audio even detection.

 

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.

Thank you for looking into this! I'm going to look into training my own model based on your ai-modelzoo.