2022-05-12 06:07 AM
Hi,
We are trying a very simple deep neural network model with 20 inputs and 3 outputs and want to generate inferences in real-time. We are following the instructions from the document "Getting started with X-CUBE-AI Expansion Package for Artificial Intelligence (AI)" numbered UM2526 with X Cube AI 7.1.0 with STM32CubeMX.
Has anyone encountered the same error?
Thanks in advance.
2022-05-12 06:15 AM
At what point, exactly, do you get that message?
It sounds like you're using the debugger, and trying to step into or break within a function called ai_platform_network_process() ?
So the first question is: do you have the source code for that function?
If you don't have the source code, then "no source available" is obviously true!
2022-05-24 12:09 PM
I have not made any changes to file generated by STM32 CubeMX. Also, this is the code that we are using for inference in the neural network:
static ai_handle network = AI_HANDLE_NULL;
ai_network_report report;
ai_bool res;
ai_error err;
const ai_u16 batch_size = 1;
err = ai_network_create(&network, AI_NETWORK_DATA_CONFIG);
AI_ALIGNED(4) static ai_u8 activations[AI_NETWORK_DATA_ACTIVATIONS_SIZE];
const ai_network_params params = {
AI_NETWORK_DATA_WEIGHTS(ai_network_data_weights_get()),
AI_NETWORK_DATA_ACTIVATIONS(activations) };
nbatch = ai_network_run(network, &ai_input[0], &ai_output[0]);
2022-05-24 12:10 PM
I have not made any changes to file generated by STM32 CubeMX. Also, this is the code that we are using for inference in the neural network:
static ai_handle network = AI_HANDLE_NULL;
ai_network_report report;
ai_bool res;
ai_error err;
const ai_u16 batch_size = 1;
err = ai_network_create(&network, AI_NETWORK_DATA_CONFIG);
AI_ALIGNED(4) static ai_u8 activations[AI_NETWORK_DATA_ACTIVATIONS_SIZE];
const ai_network_params params = {
AI_NETWORK_DATA_WEIGHTS(ai_network_data_weights_get()),
AI_NETWORK_DATA_ACTIVATIONS(activations) };
nbatch = ai_network_run(network, &ai_input[0], &ai_output[0])
2023-03-15 02:20 AM
I face with same problem. I imported Keras model and CubeAI tool could analyze the model successfully but it didn't create source file for same function. There is just a declaration for function but no definition.
Could you find any solution for that? If you found, please share with me too.
2024-11-29 01:16 PM
Hi,
I'm also facing the same issue while trying to deploy a simple neural network model using STM32Cube.AI. I'm working with a small model (https://www.youtube.com/watch?v=crJcDqIUbP4&t=85s).
I'm using X-CUBE-AI version 7.1.0 and STM32CubeMX for code generation. Although the code generation process completes successfully, I'm encountering runtime errors when trying to execute the network on the STM32. Despite following the instructions and ensuring all configurations seem correct, the inference does not run as expected. Function network_model_run() returns 0.
It would be great if someone who has encountered and resolved this issue could share their approach. Any help or guidance would be appreciated!
Thanks in advance.
2024-12-02 12:30 AM
Hello @josepauloo,
Could you try to use the latest version of X Cube AI (v9.1) and come back to me if you still encounter the issue.
Have a good day,
Julian
2024-12-02 02:23 AM
Hi Julian,
Thank you for your suggestion. I have already attempted to implement the model using the latest version of X-CUBE-AI (v9.1), but unfortunately, I am still encountering the same runtime issue during the network execution phase.
Attached, you can find the main.c file, if it helps!
Have a great day as well!
Best regards,
José
2024-12-03 04:39 AM
Hello,
Did you try to generate a project using a "SystemPerformance" template from X-CUBE-AI ?
Also, I see you are calling ai_sine_model_run() but I do not see any call to aiInit();. Is it wrapped in your function ?
Best regards,
Yanis
2024-12-03 05:20 AM
Dear Yanis,
Thank you for your response and support.
I did not use the "SystemPerformance" template to generate the project; I only used the Core functionality of X-CUBE-AI for this purpose.
Regarding the aiInit() function, could you please clarify its purpose? Is it a built-in function provided by X-CUBE-AI? If so, where is it defined, and what does it contain? If I am required to create it manually, could you provide guidance on what should be included in this function?
I have attached the project files for your reference. Additionally, here is the link to the code used to create the neural network to be embedded: https://github.com/jpauloo-git/sine_model.
Best regards,
José