Skip to main content
HAlzo
Associate III
February 20, 2020
Solved

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

  • February 20, 2020
  • 2 replies
  • 856 views

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.
Best answer by fauvarque.daniel

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.

2 replies

HAlzo
HAlzoAuthor
Associate III
February 20, 2020

I think I should pass a pointer buffer

static ai_u8 activations[AI_<network>_DATA_ACTIVATIONS_SIZE];

fauvarque.daniel
fauvarque.danielBest answer
ST Employee
February 20, 2020

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.