2025-01-21 08:00 AM
Hello!
I am using CubeAI (version 9.1) to generate code for running an ML model on a microcontroller.
When I generate the code with CubeMX using my .keras model, there are no compilation issues, and it runs perfectly.
However, when I generate the code with CubeMX using my .tflite model (quantized in int8) and then using it to compile my project, I encounter an overflow error during compilation:
region 'FLASH' overflowed by 22340 bytes.
This is quite surprising because, according to CubeMX, my quantized .tflite model is about two times smaller in both RAM and FLASH usage compared to the .keras model (I’ve attached a photo showing the FLASH and RAM usage for both models).
I use tensorflow 2.12.
My theory is that the libraries required to run my int8 model take up more FLASH space, but I’m not sure. Or maybe I made a mistake when integrating the model into my project. Does anyone have an idea where this problem might come from?