•
ai_sensing_node_network_create
ai_error ai_sensing_node_network_create(ai_handle* network, const ai_buffer*
network_config);
ai_handle ai_sensing_node_network_destroy(ai_handle network);
This is the initial function invoked by the application to create an instance of the neural network. The
ai_handle is updated after the network creation with the pointer to the entire structure. From this moment,
this handle is passed to all the other neural network related functions. The network_config parameter is
a specific network configuration buffer (opaque structure) coded as ai_buffer type. The network configuration
is decided before the code generation. Therefore, it cannot be dynamically changed by the application.
When the instance is no more used by the application, the ai_sensing_node_network_destroy()
function should be called to release the possible allocated resources.
•
ai_sensing_node_network_init
ai_bool ai_sensing_init(ai_handle network, const ai_network_params* params);
This mandatory function is used by the application to initialize the internal runtime data structures and to set
the activations buffer and weights buffer.
The params parameter is a structure (ai_network_params type) to pass the references of the generated
weights (params field).
The network handler should be a valid handle (see ai_sensing_node_network_create() function).
•
ai_sensing_node_network_run
ai_i32 ai__run(ai_handle network, const ai_buffer* input, ai_buffer* output);
This function is called to feed the neural network. The input and output buffer parameters (ai_buffer type)
provide the input tensors and store the predicted output tensors. The returned value is the number of the
input tensors processed.
UM3053 - Rev 1
UM3053
SPC5-STUDIO-AI API
page 22/39
Need help?
Do you have a question about the AEKD-AICAR1 and is the answer not in the manual?
Questions and answers