cancel
Showing results for 
Search instead for 
Did you mean: 

Using "ai_<name>_create(ai_handle* network, const ai_buffer* network_config)"

AJabe.1
Associate

I want to use my converted model, and the first step as is mentioned in the instructions, is to use this function. But I don't exactly understand what should I pass as the first argument (network) to the function. should I pass "ai_linearmodel_data_weights_get()" ??

1 REPLY 1
jean-michel.d
ST Employee

Hello,

ai__create() is the first function which must be called to create an instance of the generated c-model. This first parameter is "just" a reference to an ai_handle object which will be initialized by the "create" function and used by the other ai__*** functions as handle of the created instance.

/* Global handle to reference a instantiated C-model */
static ai_handle network = AI_HANDLE_NULL;
 
 
  /* 1 - Create an instance of the model */
  err = ai_network_create(&network, AI_NETWORK_DATA_CONFIG);

Complete snipped code example is available in the provided documentation available in the installed pack: "Embedded inference client API" article

C:\Users\\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-AI\5.1.2\Documentation\index.html

br,

Jean-Michel