Skip to main content
HAlzo
Associate III
Feb 20, 2020 2:11 PM UTC
Solved

What should be the value passed to AI_<>_DATA_ACTIVATIONS() ?

Hello,

I am using X-CUBE-AI version 5.0.0,

in the generated application template code , aiInit recives a pointer "activations", which is passed to " AI_<>_DATA_ACTIVATIONS()".

What should be the value of this parameter ?

Best Regards

Hossam Alzomor

This topic has been closed for replies.
fauvarque.daniel
fauvarque.danielBest answer
ST Employee
Feb 20, 2020 2:20 PM UTC

This is a buffer that needs to be allocated and used by the ai_***_run()

You can get all the details in the documentation (Documentation/embedded_client_api.html) see figure 3:

  • For the application, the “Activations�? buffer can be considered as a scratch or working buffer which is only used by the C-inference engine when the ai__run() function is called. Between two runs, the associated memory segment can be used by the application. This comment is also true for the input and outputs buffers.
​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.

2 replies

HAlzo
HAlzoAuthor
Associate III
Feb 20, 2020 2:18 PM UTC

I think I should pass a pointer buffer

static ai_u8 activations[AI_<network>_DATA_ACTIVATIONS_SIZE];

fauvarque.daniel
fauvarque.danielBest answer
ST Employee
Feb 20, 2020 2:20 PM UTC

This is a buffer that needs to be allocated and used by the ai_***_run()

You can get all the details in the documentation (Documentation/embedded_client_api.html) see figure 3:

  • For the application, the “Activations�? buffer can be considered as a scratch or working buffer which is only used by the C-inference engine when the ai__run() function is called. Between two runs, the associated memory segment can be used by the application. This comment is also true for the input and outputs buffers.
​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.