Question
stm32cube_ai, airun(),The output data is abnormal
- April 7, 2024
- 1 reply
- 1524 views

When I use a function 【int ai_run(const void *in_data, void *out_data)】to make predictions,the out_data always output【0】
No matter how I change the value of the input data, the value of the output data will not change, it will always be 0.
int ai_run(const void *in_data, void *out_data)
{
ai_i32 batch;
ai_input[0].data = AI_HANDLE_PTR(in_data);
ai_output[0].data = AI_HANDLE_PTR(out_data);
batch = ai_network_run(network, &ai_input[0], &ai_output[0]);
if (batch != 1) {
ai_log_err(ai_network_get_error(network),
"ai_network_run");
return -1;
}
printf("Output1: %f\r\n", *(float*)out_data);
return 0;
}
the picture is cube_ai Analyzing Network information
