cancel
Showing results for 
Search instead for 
Did you mean: 

X-Cube-AI: There is an issue to initiate when run my deployed CNN on STM32F767

qs202310
Associate II

Dear Sir/Madam,

I have a trained CNN model converted to .TFlite file. The file has been analysed and validated on PC and Target. All are correct. Then an application template was developed. When I tried to run initiate CNN model with generated function " static int ai_boostrap(ai_handle *act_addr)", there is issue in this layer:

ai_bool cnn1_configure_activations(ai_network* net_ctx, constai_network_params* params) (Can not go deep anymore).  Always return false.  From ai_cnn1_init() returned an error type 48 and error code 19 as shown in the screenshot attached.

Would you please help me sorting out this issue?

 

QS

Appendix:

AI_DECLARE_STATIC

ai_bool cnn1_configure_activations(

ai_network* net_ctx, const ai_network_params* params)

{

AI_ASSERT(net_ctx)

 

if (ai_platform_get_activations_map(g_cnn1_activations_map, 1, params)) {

/* Updating activations (byte) offsets */

 

serving_default_Combined_Input0_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 632);

serving_default_Combined_Input0_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 632);

slice_38_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 992);

slice_38_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 992);

slice_51_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1112);

slice_51_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1112);

conv2d_99_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1152);

conv2d_99_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1152);

nl_99_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1152);

nl_99_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1152);

pool_102_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1152);

pool_102_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1152);

slice_45_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1112);

slice_45_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1112);

conv2d_82_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1344);

conv2d_82_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1344);

nl_82_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1344);

nl_82_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1344);

pool_85_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1344);

pool_85_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1344);

slice_39_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1112);

slice_39_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1112);

conv2d_67_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1536);

conv2d_67_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1536);

nl_67_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1536);

nl_67_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1536);

pool_70_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1536);

pool_70_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1536);

concat_104_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1728);

concat_104_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1728);

slice_19_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 992);

slice_19_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 992);

slice_32_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1112);

slice_32_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1112);

conv2d_93_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

conv2d_93_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

nl_93_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

nl_93_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

pool_96_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1112);

pool_96_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1112);

slice_26_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1304);

slice_26_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1304);

conv2d_77_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

conv2d_77_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

nl_77_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

nl_77_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

pool_80_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1304);

pool_80_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1304);

slice_20_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1496);

slice_20_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1496);

conv2d_62_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

conv2d_62_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

nl_62_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

nl_62_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

pool_65_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1496);

pool_65_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1496);

concat_98_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2304);

concat_98_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2304);

slice_0_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 992);

slice_0_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 992);

slice_13_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 632);

slice_13_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 632);

conv2d_87_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

conv2d_87_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

nl_87_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

nl_87_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

pool_90_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 632);

pool_90_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 632);

slice_7_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 824);

slice_7_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 824);

conv2d_72_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

conv2d_72_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

nl_72_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

nl_72_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

pool_75_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1112);

pool_75_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1112);

slice_1_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 824);

slice_1_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 824);

conv2d_57_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

conv2d_57_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

nl_57_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

nl_57_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

pool_60_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 824);

pool_60_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 824);

concat_92_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 2880);

concat_92_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 2880);

concat_105_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 0);

concat_105_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 0);

conv2d_107_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 1728);

conv2d_107_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 1728);

nl_107_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 0);

nl_107_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 0);

gemm_117_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 192);

gemm_117_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 192);

nl_119_nl_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 576);

nl_119_nl_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 576);

gemm_121_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 0);

gemm_121_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 0);

normalization_122_output_array.data = AI_PTR(g_cnn1_activations_map[0] + 16);

normalization_122_output_array.data_start = AI_PTR(g_cnn1_activations_map[0] + 16);

return true;

}

AI_ERROR_TRAP(net_ctx, INIT_FAILED, NETWORK_ACTIVATIONS);

return false;

}

 

1 REPLY 1
Julian E.
ST Employee

Hello @qs202310 ,

 

What version of cubeAI are you using. Try generating your project with the application template with the lastest version of cubeAI.

Can you share your model in a .zip file?

 

Your errors 48 and 19 correspond to initialization errors (in middleware/st/ai/ai_platform.h)

JulianE_0-1733995908759.png

 

Have a good day,

Julian

 

 

 


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.