cancel
Showing results for 
Search instead for 
Did you mean: 

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

HAlzo
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
fauvarque.daniel
ST Employee

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.

View solution in original post

2 REPLIES 2
HAlzo
Senior

I think I should pass a pointer buffer

static ai_u8 activations[AI_<network>_DATA_ACTIVATIONS_SIZE];

fauvarque.daniel
ST Employee

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.