Neural Network Tools for STM32AI v1.7.0 (STM.ai v8.0.1-19450)
Created date          : 2024-07-04 22:53:14
Parameters            : generate --type onnx -n plantnetwork -m ../Data/NNmodel/Model_0.onnx -o ../Data/Cmodel

Exec/report summary (generate)
---------------------------------------------------------------------------------------------------------------
model file         :   /home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/NNmodel/Model_0.onnx   
type               :   onnx                                                                                    
c_name             :   plantnetwork                                                                            
compression        :   lossless                                                                                
optimization       :   balanced                                                                                
target/series      :   generic                                                                                 
workspace dir      :   /home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Scripts/stm32ai_ws          
output dir         :   /home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel                 
model_fmt          :   float                                                                                   
model_name         :   Model_0                                                                                 
model_hash         :   14ef9a967240fa9d1ba68caa9c0b3b36                                                        
params #           :   151 items (604 B)                                                                       
---------------------------------------------------------------------------------------------------------------
input 1/1          :   'input_0' (domain:user/)                                                                
                   :   2 items, 8 B, ai_float, float, (1,1,1,2)                                                
output 1/1         :   'output_0' (domain:user/)                                                               
                   :   1 items, 4 B, ai_float, float, (1,1,1,1)                                                
macc               :   171                                                                                     
weights (ro)       :   604 B (604 B) (1 segment)                                                               
activations (rw)   :   80 B (80 B) (1 segment)                                                                 
ram (total)        :   92 B (92 B) = 80 + 8 + 4                                                                
---------------------------------------------------------------------------------------------------------------

Model name - Model_0 ['input_0'] ['output_0']
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
m_id   layer (type,original)                             oshape        param/size     macc                 connected to   | c_size         c_macc          c_type             
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
1      Impedance (Placeholder, Gemm)                     [h:10,c:2]    20/80                                              | +40(+50.0%)    +30(+100.0%)    dense_of32[0]      
       InputLayer_bias (Placeholder, Gemm)               [c:10]        10/40                                              | -40(-100.0%)                   
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
3      Layer1_weight (Placeholder, Gemm)                 [h:10,c:10]   100/400                                            | +40(+10.0%)    +110(+100.0%)   dense_of32[2]      
       Layer1_bias (Placeholder, Gemm)                   [c:10]        10/40                                              | -40(-100.0%)                   
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
5      Output_weight (Placeholder, Gemm)                 [h:1,c:10]    10/40                                              | +4(+10.0%)     +11(+100.0%)    dense_of32[o][4]   
       Output_bias (Placeholder, Gemm)                   [c:1]         1/4                                                | -4(-100.0%)                    
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
0      input_0 (Input, )                                 [b:1,c:2]                                                        |                                
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
1      _InputLayer_Gemm_output_0 (Gemm, Gemm)            [b:1,c:10]                     30                      input_0   |                -30(-100.0%)    
                                                                                                              Impedance   | 
                                                                                                        InputLayer_bias   | 
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
2      _Activation0_Relu_output_0 (Nonlinearity, Relu)   [b:1,c:10]                     10    _InputLayer_Gemm_output_0   |                                nl_of32[1]         
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
3      _Layer1_Gemm_output_0 (Gemm, Gemm)                [b:1,c:10]                    110   _Activation0_Relu_output_0   |                -110(-100.0%)   
                                                                                                          Layer1_weight   | 
                                                                                                            Layer1_bias   | 
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
4      _Activation1_Relu_output_0 (Nonlinearity, Relu)   [b:1,c:10]                     10        _Layer1_Gemm_output_0   |                                nl_of32[3]         
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
5      output_0 (Gemm, Gemm)                             [b:1,c:1]                      11   _Activation1_Relu_output_0   |                -11(-100.0%)    
                                                                                                          Output_weight   | 
                                                                                                            Output_bias   | 
------ ------------------------------------------------- ------------- ------------ ------ ---------------------------- --- -------------- --------------- ------------------ 
model/c-model: macc=171/171  weights=604/604  activations=--/80 io=--/12



Generated C-graph summary
------------------------------------------------------------------------------------------------------------------------
model name            : model_0
c-name                : plantnetwork
c-node #              : 5
c-array #             : 12
activations size      : 80 (1 segment)
weights size          : 604 (1 segment)
macc                  : 171
inputs                : ['input_0_output']
outputs               : ['output_0_output']

C-Arrays (12)
------ ----------------------------------- ----------- ------------------------- ------------- --------- --------- 
c_id   name (*_array)                      item/size   domain/mem-pool           c-type        fmt       comment   
------ ----------------------------------- ----------- ------------------------- ------------- --------- --------- 
0      _InputLayer_Gemm_output_0_weights   20/80       weights/weights           const float   float32             
1      _InputLayer_Gemm_output_0_bias      10/40       weights/weights           const float   float32             
2      _Layer1_Gemm_output_0_weights       100/400     weights/weights           const float   float32             
3      _Layer1_Gemm_output_0_bias          10/40       weights/weights           const float   float32             
4      input_0_output                      2/8         user/                     float         float32   /input    
5      output_0_weights                    10/40       weights/weights           const float   float32             
6      _InputLayer_Gemm_output_0_output    10/40       activations/**default**   float         float32             
7      _Activation0_Relu_output_0_output   10/40       activations/**default**   float         float32             
8      _Layer1_Gemm_output_0_output        10/40       activations/**default**   float         float32             
9      output_0_bias                       1/4         weights/weights           const float   float32             
10     _Activation1_Relu_output_0_output   10/40       activations/**default**   float         float32             
11     output_0_output                     1/4         user/                     float         float32   /output   
------ ----------------------------------- ----------- ------------------------- ------------- --------- --------- 

C-Layers (5)
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 
c_id   name (*_layer)               id   layer_type   macc   rom   tensors                                shape (array id)   
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 
0      _InputLayer_Gemm_output_0    1    dense        30     120   I: input_0_output                      (1,1,1,2) (4)      
                                                                   W: _InputLayer_Gemm_output_0_weights   (2,1,1,10) (0)     
                                                                   W: _InputLayer_Gemm_output_0_bias      (1,1,1,10) (1)     
                                                                   O: _InputLayer_Gemm_output_0_output    (1,1,1,10) (6)     
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 
1      _Activation0_Relu_output_0   2    nl           10     0     I: _InputLayer_Gemm_output_0_output    (1,1,1,10) (6)     
                                                                   O: _Activation0_Relu_output_0_output   (1,1,1,10) (7)     
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 
2      _Layer1_Gemm_output_0        3    dense        110    440   I: _Activation0_Relu_output_0_output   (1,1,1,10) (7)     
                                                                   W: _Layer1_Gemm_output_0_weights       (10,1,1,10) (2)    
                                                                   W: _Layer1_Gemm_output_0_bias          (1,1,1,10) (3)     
                                                                   O: _Layer1_Gemm_output_0_output        (1,1,1,10) (8)     
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 
3      _Activation1_Relu_output_0   4    nl           10     0     I: _Layer1_Gemm_output_0_output        (1,1,1,10) (8)     
                                                                   O: _Activation1_Relu_output_0_output   (1,1,1,10) (10)    
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 
4      output_0                     5    dense        11     44    I: _Activation1_Relu_output_0_output   (1,1,1,10) (10)    
                                                                   W: output_0_weights                    (10,1,1,1) (5)     
                                                                   W: output_0_bias                       (1,1,1,1) (9)      
                                                                   O: output_0_output                     (1,1,1,1) (11)     
------ ---------------------------- ---- ------------ ------ ----- -------------------------------------- ------------------ 



Number of operations per c-layer
------- ------ ----------------------------------- ----- -------------- -------- ---------- 
c_id    m_id   name (type)                           #op           type   #param   sparsity 
------- ------ ----------------------------------- ----- -------------- -------- ---------- 
0       1      _InputLayer_Gemm_output_0 (dense)      30   smul_f32_f32       30     0.0000 
1       2      _Activation0_Relu_output_0 (nl)        10     op_f32_f32          
2       3      _Layer1_Gemm_output_0 (dense)         110   smul_f32_f32      110     0.0000 
3       4      _Activation1_Relu_output_0 (nl)        10     op_f32_f32          
4       5      output_0 (dense)                       11   smul_f32_f32       11     0.0000 
------- ------ ----------------------------------- ----- -------------- -------- ---------- 
total                                                171                     151     0.0000 

Number of operation types
---------------- ----- ----------- 
operation type       #           % 
---------------- ----- ----------- 
smul_f32_f32       151       88.3% 
op_f32_f32          20       11.7% 

Complexity report (model)
------ ---------------------------- ------------------------- ------------------------- ------ 
m_id   name                         c_macc                    c_rom                     c_id   
------ ---------------------------- ------------------------- ------------------------- ------ 
1      Impedance                    |||||             17.5%   |||||             19.9%   [0]    
3      Layer1_weight                ||||||||||||||||  64.3%   ||||||||||||||||  72.8%   [2]    
5      Output_weight                ||                 6.4%   ||                 7.3%   [4]    
2      _Activation0_Relu_output_0   ||                 5.8%   |                  0.0%   [1]    
4      _Activation1_Relu_output_0   ||                 5.8%   |                  0.0%   [3]    
------ ---------------------------- ------------------------- ------------------------- ------ 
macc=171 weights=604 act=80 ram_io=12

Generated files (7)
---------------------------------------------------------------------------------------------------- 
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork_config.h        
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork.h               
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork.c               
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork_data_params.h   
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork_data_params.c   
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork_data.h          
/home/repex/OneDrive(PoliTo)(Online)/Tesi/proj/PlantFW_LoRa/Data/Cmodel/plantnetwork_data.c          
