Neural Network Tools for STM32 family v1.7.0 (stm.ai v8.1.0-19520) Created date : 2024-07-24 14:04:46 Parameters : analyze --name offlinetest -m C:/Users/mehmet/Desktop/adem offline test/104 ML model/par_104_model.h5 --type keras --compression none --verbosity 1 --workspace C:\Users\mehmet\AppData\Local\Temp\mxAI_workspace113932124683800010372410644669982671 --output C:\Users\mehmet\.stm32cubemx\network_output --allocate-inputs --series stm32f4 --allocate-outputs Exec/report summary (analyze) --------------------------------------------------------------------------------------------------------------- model file : C:\Users\mehmet\Desktop\adem offline test\104 ML model\par_104_model.h5 type : keras c_name : offlinetest compression : none options : allocate-inputs, allocate-outputs optimization : balanced target/series : stm32f4 workspace dir : C:\Users\mehmet\AppData\Local\Temp\mxAI_workspace113932124683800010372410644669982671 output dir : C:\Users\mehmet\.stm32cubemx\network_output model_fmt : float model_name : par_104_model model_hash : b6eaa97be6bd4ed63f26faa8be229126 params # : 11,609 items (45.35 KiB) --------------------------------------------------------------------------------------------------------------- input 1/1 : 'input_1' (domain:activations/**default**) : 3300 items, 12.89 KiB, ai_float, float, (1,100,33,1) output 1/1 : 'dense_2' (domain:activations/**default**) : 1 items, 4 B, ai_float, float, (1,1) macc : 192,615 weights (ro) : 44,932 B (43.88 KiB) (1 segment) / -1,504(-3.2%) vs float model activations (rw) : 14,668 B (14.32 KiB) (1 segment) * ram (total) : 14,668 B (14.32 KiB) = 14,668 + 0 + 0 --------------------------------------------------------------------------------------------------------------- (*) 'input'/'output' buffers can be used from the activations buffer Model name - par_104_model ['input_1'] ['dense_2'] ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- m_id layer (type,original) oshape param/size macc connected to | c_size c_macc c_type ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 0 input_1 (Input, InputLayer) [b:None,h:100,h:100,w:33,c:1] | ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 1 conv2d_conv2d (Conv2D, Conv2D) [b:None,h:20,h:20,w:10,c:16] 496/1,984 96,016 input_1 | +3,200(+3.3%) conv2d_of32/nl_of32[0, 1] conv2d (Nonlinearity, Conv2D) [b:None,h:20,h:20,w:10,c:16] 3,200 conv2d_conv2d | -3,200(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 2 batch_normalization (ScaleBias, BatchNormalization) [b:None,h:20,h:20,w:10,c:16] 32/128 6,400 conv2d | bn_of32[2] ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 3 max_pooling2d (Pool, MaxPooling2D) [b:None,h:10,h:10,w:4,c:16] 5,120 batch_normalization | pool_of32[3] ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 4 conv2d_1_conv2d (Conv2D, Conv2D) [b:None,h:8,h:8,w:2,c:32] 4,640/18,560 73,760 max_pooling2d | +512(+0.7%) conv2d_of32/nl_of32[4, 5] conv2d_1 (Nonlinearity, Conv2D) [b:None,h:8,h:8,w:2,c:32] 512 conv2d_1_conv2d | -512(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 5 batch_normalization_1 (ScaleBias, BatchNormalization) [b:None,h:8,h:8,w:2,c:32] 64/256 1,024 conv2d_1 | bn_of32[6] ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 6 max_pooling2d_1 (Pool, MaxPooling2D) [b:None,h:4,h:4,w:1,c:32] 512 batch_normalization_1 | pool_of32[7] ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 7 flatten (Reshape, Flatten) [b:None,c:128] max_pooling2d_1 | ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 9 batch_normalization_2 (ScaleBias, BatchNormalization) [b:None,c:128] 256/1,024 256 flatten | -1,024(-100.0%) -256(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 10 dense_dense (Dense, Dense) [b:None,c:40] 5,160/20,640 5,160 batch_normalization_2 | +40(+0.8%) dense_of32/nl_of32[8, 9] dense (Nonlinearity, Dense) [b:None,c:40] 40 dense_dense | -40(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 11 batch_normalization_3 (ScaleBias, BatchNormalization) [b:None,c:40] 80/320 80 dense | -320(-100.0%) -80(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 12 dense_1_dense (Dense, Dense) [b:None,c:20] 820/3,280 820 batch_normalization_3 | +20(+2.4%) dense_of32/nl_of32[10, 11] dense_1 (Nonlinearity, Dense) [b:None,c:20] 20 dense_1_dense | -20(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 13 batch_normalization_4 (ScaleBias, BatchNormalization) [b:None,c:20] 40/160 40 dense_1 | -160(-100.0%) -40(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- 14 dense_2_dense (Dense, Dense) [b:None,c:1] 21/84 21 batch_normalization_4 | +10(+47.6%) dense_of32/nl_of32[o][12, 13] dense_2 (Nonlinearity, Dense) [b:None,c:1] 10 dense_2_dense | -10(-100.0%) ------ ------------------------------------------------------- ------------------------------- -------------- -------- ----------------------- --- ----------------- ----------------- ------------------------------- model/c-model: macc=192,991/192,615 -376(-0.2%) weights=46,436/44,932 -1,504(-3.2%) activations=--/14,668 io=--/0 Generated C-graph summary ------------------------------------------------------------------------------------------------------------------------ model name : par_104_model c-name : offlinetest c-node # : 14 c-array # : 29 activations size : 14668 (1 segment) weights size : 44932 (1 segment) macc : 192615 inputs : ['input_1_output'] outputs : ['dense_2_output'] C-Arrays (29) ------ ------------------------------ ------------ ------------------------- ------------- --------- --------- c_id name (*_array) item/size domain/mem-pool c-type fmt comment ------ ------------------------------ ------------ ------------------------- ------------- --------- --------- 0 max_pooling2d_1_output 128/512 activations/**default** float float32 1 dense_dense_output 40/160 activations/**default** float float32 2 dense_output 40/160 activations/**default** float float32 3 dense_1_dense_output 20/80 activations/**default** float float32 4 dense_1_output 20/80 activations/**default** float float32 5 dense_2_dense_output 1/4 activations/**default** float float32 6 dense_2_output 1/4 activations/**default** float float32 /output 7 conv2d_conv2d_weights 480/1920 weights/weights const float float32 8 conv2d_conv2d_bias 16/64 weights/weights const float float32 9 batch_normalization_scale 16/64 weights/weights const float float32 10 batch_normalization_bias 16/64 weights/weights const float float32 11 conv2d_1_conv2d_weights 4608/18432 weights/weights const float float32 12 conv2d_1_conv2d_bias 32/128 weights/weights const float float32 13 batch_normalization_1_scale 32/128 weights/weights const float float32 14 batch_normalization_1_bias 32/128 weights/weights const float float32 15 dense_dense_weights 5120/20480 weights/weights const float float32 16 dense_dense_bias 40/160 weights/weights const float float32 17 dense_1_dense_weights 800/3200 weights/weights const float float32 18 dense_1_dense_bias 20/80 weights/weights const float float32 19 dense_2_dense_weights 20/80 weights/weights const float float32 20 dense_2_dense_bias 1/4 weights/weights const float float32 21 input_1_output 3300/13200 activations/**default** float float32 /input 22 conv2d_conv2d_output 3200/12800 activations/**default** float float32 23 conv2d_output 3200/12800 activations/**default** float float32 24 batch_normalization_output 3200/12800 activations/**default** float float32 25 max_pooling2d_output 640/2560 activations/**default** float float32 26 conv2d_1_conv2d_output 512/2048 activations/**default** float float32 27 conv2d_1_output 512/2048 activations/**default** float float32 28 batch_normalization_1_output 512/2048 activations/**default** float float32 ------ ------------------------------ ------------ ------------------------- ------------- --------- --------- C-Layers (14) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- c_id name (*_layer) id layer_type macc rom tensors shape (array id) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 0 conv2d_conv2d 1 conv2d 96016 1984 I: input_1_output (1,100,33,1) (21) W: conv2d_conv2d_weights (1,5,6,16) (7) W: conv2d_conv2d_bias (16,) (8) O: conv2d_conv2d_output (1,20,10,16) (22) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 1 conv2d 1 nl 3200 0 I: conv2d_conv2d_output (1,20,10,16) (22) O: conv2d_output (1,20,10,16) (23) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 2 batch_normalization 2 bn 6400 128 I: conv2d_output (1,20,10,16) (23) W: batch_normalization_scale (16,) (9) W: batch_normalization_bias (16,) (10) O: batch_normalization_output (1,20,10,16) (24) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 3 max_pooling2d 3 pool 5120 0 I: batch_normalization_output (1,20,10,16) (24) O: max_pooling2d_output (1,10,4,16) (25) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 4 conv2d_1_conv2d 4 conv2d 73760 18560 I: max_pooling2d_output (1,10,4,16) (25) W: conv2d_1_conv2d_weights (16,3,3,32) (11) W: conv2d_1_conv2d_bias (32,) (12) O: conv2d_1_conv2d_output (1,8,2,32) (26) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 5 conv2d_1 4 nl 512 0 I: conv2d_1_conv2d_output (1,8,2,32) (26) O: conv2d_1_output (1,8,2,32) (27) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 6 batch_normalization_1 5 bn 1024 256 I: conv2d_1_output (1,8,2,32) (27) W: batch_normalization_1_scale (32,) (13) W: batch_normalization_1_bias (32,) (14) O: batch_normalization_1_output (1,8,2,32) (28) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 7 max_pooling2d_1 6 pool 512 0 I: batch_normalization_1_output (1,8,2,32) (28) O: max_pooling2d_1_output (1,4,1,32) (0) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 8 dense_dense 10 dense 5160 20640 I: max_pooling2d_1_output0 (1,128) (0) W: dense_dense_weights (128,40) (15) W: dense_dense_bias (40,) (16) O: dense_dense_output (1,40) (1) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 9 dense 10 nl 40 0 I: dense_dense_output (1,40) (1) O: dense_output (1,40) (2) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 10 dense_1_dense 12 dense 820 3280 I: dense_output (1,40) (2) W: dense_1_dense_weights (40,20) (17) W: dense_1_dense_bias (20,) (18) O: dense_1_dense_output (1,20) (3) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 11 dense_1 12 nl 20 0 I: dense_1_dense_output (1,20) (3) O: dense_1_output (1,20) (4) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 12 dense_2_dense 14 dense 21 84 I: dense_1_output (1,20) (4) W: dense_2_dense_weights (20,1) (19) W: dense_2_dense_bias (1,) (20) O: dense_2_dense_output (1,1) (5) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- 13 dense_2 14 nl 10 0 I: dense_2_dense_output (1,1) (5) O: dense_2_output (1,1) (6) ------ ----------------------- ---- ------------ ------- ------- --------------------------------- ------------------- Number of operations per c-layer ------- ------ ---------------------------- --------- -------------- -------- ---------- c_id m_id name (type) #op type #param sparsity ------- ------ ---------------------------- --------- -------------- -------- ---------- 0 1 conv2d_conv2d (conv2d) 96,016 smul_f32_f32 496 0.0000 1 1 conv2d (nl) 3,200 op_f32_f32 2 2 batch_normalization (bn) 6,400 smul_f32_f32 32 0.0000 3 3 max_pooling2d (pool) 5,120 op_f32_f32 4 4 conv2d_1_conv2d (conv2d) 73,760 smul_f32_f32 4,640 0.0000 5 4 conv2d_1 (nl) 512 op_f32_f32 6 5 batch_normalization_1 (bn) 1,024 smul_f32_f32 64 0.0000 7 6 max_pooling2d_1 (pool) 512 op_f32_f32 8 10 dense_dense (dense) 5,160 smul_f32_f32 5,160 0.0000 9 10 dense (nl) 40 op_f32_f32 10 12 dense_1_dense (dense) 820 smul_f32_f32 820 0.0000 11 12 dense_1 (nl) 20 op_f32_f32 12 14 dense_2_dense (dense) 21 smul_f32_f32 21 0.0000 13 14 dense_2 (nl) 10 op_f32_f32 ------- ------ ---------------------------- --------- -------------- -------- ---------- total 192,615 11,233 0.0000 Number of operation types ---------------- --------- ----------- operation type # % ---------------- --------- ----------- smul_f32_f32 183,201 95.1% op_f32_f32 9,414 4.9% Complexity report (model) ------ ----------------------- ------------------------- ------------------------- ---------- m_id name c_macc c_rom c_id ------ ----------------------- ------------------------- ------------------------- ---------- 1 conv2d_conv2d |||||||||||||||| 51.5% || 4.4% [0, 1] 2 batch_normalization | 3.3% | 0.3% [2] 3 max_pooling2d | 2.7% | 0.0% [3] 4 conv2d_1_conv2d |||||||||||| 38.6% |||||||||||||| 41.3% [4, 5] 5 batch_normalization_1 | 0.5% | 0.6% [6] 6 max_pooling2d_1 | 0.3% | 0.0% [7] 10 dense_dense | 2.7% |||||||||||||||| 45.9% [8, 9] 12 dense_1_dense | 0.4% ||| 7.3% [10, 11] 14 dense_2_dense | 0.0% | 0.2% [12, 13] ------ ----------------------- ------------------------- ------------------------- ---------- macc=192,615 weights=44,932 act=14,668 ram_io=0 Requested memory size per segment ("stm32f4" series) ----------------------------- -------- -------- ------- -------- module text rodata data bss ----------------------------- -------- -------- ------- -------- NetworkRuntime810_CM4_GCC.a 10,384 0 0 0 offlinetest.o 876 112 3,880 260 offlinetest_data.o 56 48 88 0 lib (toolchain)* 614 24 0 0 ----------------------------- -------- -------- ------- -------- RT total** 11,930 184 3,968 260 ----------------------------- -------- -------- ------- -------- *weights* 0 44,936 0 0 *activations* 0 0 0 14,668 *io* 0 0 0 0 ----------------------------- -------- -------- ------- -------- TOTAL 11,930 45,120 3,968 14,928 ----------------------------- -------- -------- ------- -------- * toolchain objects (libm/libgcc*) ** RT - AI runtime objects (kernels+infrastructure) Summary per memory device type --------------------------------------------- .\device FLASH % RAM % --------------------------------------------- RT total 16,082 26.4% 4,228 22.4% --------------------------------------------- TOTAL 61,018 18,896 ---------------------------------------------