how to use public API of cubeMX AI API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 12:24 AM
We have a trained keras model, and we we are trying to deploy it on the stm32. We successfully loaded the model on cubeMX and can see the generated code in Keil.(attached .h and .c files).
WE are having difficulty understanding what to pass as arguments to the create function below - Any suggestions would be of great help.
ai_error ai_rnn2_create(
ai_handle* network, const ai_buffer* network_config);
thank you
siva
- Labels:
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-06 6:28 AM
Hello,
If you looking for an example of code you can:
- Generate a validation application by selecting Validation in the additional software window of CubeMX, you will then have the code used to for validation (which includes all the pipeline to initialize,set inputs, run, get outputs of the NN)
- You can check this application: https://github.com/ROC5COR/HousePricePredictionOnSTM32 which is just a very simple project that uses STM32 AI API to predict prices of houses. You can then see how data are loaded, how NN is initialized, how the prediction is done and how output is fetched :smiling_face_with_smiling_eyes: (the project uses an old version of X-Cube-AI v3.3.0 but you can always use the sources to get inspired and see how the functions are called)
Hope this can help you!
Romain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-08 11:35 PM
Hi,
Thank you for the reply.
For learning purpose I tried to work on your model(keras house prediction), and converted the same with "cube-ai", when tried to build the project I am getting this error, error: #3626: a designator cannot be used with a non-aggregate type "ai_buffer_format"
Attached an image of the same, please have a look.I couldn't clearly understand the problem, can you let me know what is the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-08-09 2:48 AM
Hello,
I tried with the new version X-Cube-AI 4.0.0
The problem is caused by the '{...}' around AI_NETWORK_IN
You have to remove the '{}' around AI_NETWORK_IN => ai_buffer input_data[AI_NETWORK_IN_NUM] = AI_NETWORK_IN;
Romain
