2024-12-11 02:19 AM - last edited on 2024-12-11 05:53 AM by Julian E.
I am working on deploying a 1D CNN model on an STM microcontroller using STM32CubeMX with the X-CUBE-AI package to convert the TensorFlow Lite model into C code.
While testing the model, I noticed significant discrepancies in predictions:
Steps Taken:
Questions:
2024-12-12 01:47 AM
The STM32Cube.AI (i.e. X-CUBE-AI) library used on the target has it's own implementation of the neural network kernels so you may see different results between the results when executed in Python versus the target.
In the X-Cube-AI tool you have 2 validate buttons, one to validate on the desktop using the same library as the one used on the target and one validate on target.
The results of the validate on desktop and validate on target should not differ as it is basically the same library. On the target we have some more optimizations based on the processor you use.
If you see a bad COS (less that 0.98) when you validate the model with real data then it is likely to be a bug in the implementation of the kernels that we should look at.
Could you share your model and ideally some input/output data so we can reproduce the issue ?
Thanks in advance
Regards