X-CUBE AI PROBLEM WITH INFERENCE RESULT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-17 6:38 AM - edited ‎2024-07-17 6:41 AM
I have created my own cnn model and want to run it on STMH753ZI board using X-CUBE-AI. I have executed all the steps to run the inference. The inference is also running but the output is always 0. With my fixed input of sample shape (1,50,12). I cannot understand the problem. I attaching the code script and the terminal output.
- Labels:
-
STM32CubeAI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-17 8:35 AM
You can use the validate command on host or on the target to verify that your model is behaving the same way in Python and in C.
Generally it could be a problem with the way you pass the data to the network especially when the network is quantized.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-18 2:15 AM
I have validated on desktop and on target. It validates successfully on system but give an error when validating on target.
Running the Keras model...
Running the STM AI c-model (AI RUNNER)...(name=cnn, mode=TARGET)
INTERNAL ERROR: E801(HwIOError): Invalid firmware - COM9:115200
Whereas COM9 is the port that I use to run the inference on board with output on Putty terminal which it does.
I am attaching the screenshot of validation as well. I try to give the input in the same way as well as I see in validation like a 3d array to get shape (1,50,12). But doesn't seem to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-18 4:57 AM
One way to see if the validation program is starting correctly on the board is to launch a pseudo tty on this com port and see if you have messages coming from the validation program when you reset the board (reset button).
If you have no messages the compile / flash of the program did not happen or did not finish successfully
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-23 3:28 AM
I believe there is an issue with the flashing during Validation on Target. Because when I do as you suggested. I get messages on PUTTY of the old firmware I flashed for inference. INTERNAL ERROR: E801(HwIOError): Invalid firmware - COM9:115200 How to resolve this error?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-23 4:39 AM
Generate the code separately (AI + Validation application), compile it and flash it using your IDE or STM32CubeProgrammer.
You can also see in the log (under ~/.stm32cubemx/STM32CubeMX.log) the output of the different commands and you'll see if the automatic call to STM32CubeProgrammer was successful
Regards
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-23 4:43 AM
Is there a tutorial I can follow for all you suggested?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2024-07-23 7:46 AM
https://www.st.com/en/embedded-software/x-cube-ai.html#documentation
The document details step by step how to use the UI
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.
