수행기록퀘스트1

[Quest1] 수행
2022. 8. 4 (목) 21:23 saeba 조회 423 좋아요 0 스크랩 0 댓글 0

Cube Ai개발 환경 구축하기

 

1 mcu 선택

2.Soiftware Packs -> Components선택

3.X Cube Ai 버전 선택

4.Software Packs -> STMicroelectronics 선택

5.모델 선택

6. 분석 버튼 누르기 결과



Analyzing model 
C:/Users/Owner/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/windows/stm32ai analyze --name network -m E:/tmp2/contest/cubeai/en.fp-ai-sensing1/STM32CubeFunctionPack_SENSING1_V4.0.3/Utilities/AI_Ressources/models/cnn_gmp.h5 --type keras --compression none --verbosity 1 --workspace C:\Users\Owner\AppData\Local\Temp\mxAI_workspace3688848629900381216412329733069 --output C:\Users\Owner\.stm32cubemx\network_output --allocate-inputs --allocate-outputs  
Neural Network Tools for STM32AI v1.6.0 (STM.ai v7.2.0-RC5) 
  
 Exec/report summary (analyze) 
 ------------------------------------------------------------------------------------------------------------------------ 
 model file           : E:\tmp2\contest\cubeai\en.fp-ai-sensing1\STM32CubeFunctionPack_SENSING1_V4.0.3\Utilities\AI_Ressources\models\cnn_gmp.h5 
 type                 : keras 
 c_name               : network 
 compression          : none 
 allocator strategy   : ['allocate-inputs', 'allocate-outputs'] 
 workspace dir        : C:\Users\Owner\AppData\Local\Temp\mxAI_workspace3688848629900381216412329733069 
 output dir           : C:\Users\Owner\.stm32cubemx\network_output 
 model_name           : cnn_gmp 
 model_hash           : 954164d0a35496bd293bb6b3429c6a79 
 input 1/1            : 'input_0' 
                        72 items, 288 B, ai_float, float, (1,24,3,1), domain:activations/**default** 
 output 1/1           : 'softmax_1' 
                        5 items, 20 B, ai_float, float, (1,1,1,5), domain:activations/**default** 
 params #             : 1,477 items (5.77 KiB) 
 macc                 : 68,928 
 weights (ro)         : 5,908 B (5.77 KiB) (1 segment) 
 activations (rw)     : 6,976 B (6.81 KiB) (1 segment) * 
 ram (total)          : 6,976 B (6.81 KiB) = 6,976 + 0 + 0 
  
 (*) input/output buffers can be used from the activations buffer 
  
 Model name - cnn_gmp ['input_0'] ['softmax_1'] 
 --------------------------------------------------------------------------------------------------------- 
 id   layer (original)                  oshape                   param/size    macc     connected to      
 --------------------------------------------------------------------------------------------------------- 
 0    input_0 (None)                    [b:None,h:24,w:3,c:1]                                             
      quantize_1_conv2d (Conv2D)        [b:None,h:20,w:3,c:16]   96/384        4,816    input_0           
      quantize_1 (Conv2D)               [b:None,h:20,w:3,c:16]                 960      quantize_1_conv2d 
 --------------------------------------------------------------------------------------------------------- 
 1    quantize_2_conv2d (Conv2D)        [b:None,h:16,w:3,c:16]   1,296/5,184   61,456   quantize_1        
      quantize_2 (Conv2D)               [b:None,h:16,w:3,c:16]                 768      quantize_2_conv2d 
 --------------------------------------------------------------------------------------------------------- 
 2    quantize_3 (GlobalMaxPooling2D)   [b:None,h:1,w:1,c:16]                  768      quantize_2        
 --------------------------------------------------------------------------------------------------------- 
 3    quantize_4_dense (Dense)          [b:None,h:1,w:1,c:5]     85/340        85       quantize_3        
 --------------------------------------------------------------------------------------------------------- 
 4    softmax_1 (Softmax)               [b:None,h:1,w:1,c:5]                   75       quantize_4_dense  
 --------------------------------------------------------------------------------------------------------- 
 model/c-model: macc=68,928/68,928  weights=5,908/5,908  activations=--/6,976 io=--/0 
  
 Number of operations per c-layer 
 ------------------------------------------------------------------------------------- 
 c_id    m_id   name (type)                            #op (type)                     
 ------------------------------------------------------------------------------------- 
 0       0      quantize_1_conv2d (conv2d)                       5,776 (smul_f32_f32) 
 1       2      quantize_2_conv2d (optimized_conv2d)            62,992 (smul_f32_f32) 
 2       3      quantize_4_dense (dense)                            85 (smul_f32_f32) 
 3       4      softmax_1 (nl)                                      75 (op_f32_f32)   
 ------------------------------------------------------------------------------------- 
 total                                                          68,928                
  
   Number of operation types 
   --------------------------------------------- 
   smul_f32_f32              68,853       99.9% 
   op_f32_f32                    75        0.1% 
  
 Complexity report (model) 
 ----------------------------------------------------------------------------------- 
 m_id   name               c_macc                    c_rom                     c_id 
 ----------------------------------------------------------------------------------- 
 0      input_0            ||                 8.4%   ||                 6.5%   [0]  
 2      quantize_3         ||||||||||||||||  91.4%   ||||||||||||||||  87.7%   [1]  
 3      quantize_4_dense   |                  0.1%   |                  5.8%   [2]  
 4      softmax_1          |                  0.1%   |                  0.0%   [3]  
 ----------------------------------------------------------------------------------- 
 macc=68,928 weights=5,908 act=6,976 ram_io=0 
Creating txt report file C:\Users\Owner\.stm32cubemx\network_output\network_analyze_report.txt 
elapsed time (analyze): 1.386s 
Getting Flash and Ram size used by the library 
Model file:      cnn_gmp.h5 
Total Flash:     24356 B (23.79 KiB) 
    Weights:     5908 B (5.77 KiB) 
    Library:     18448 B (18.02 KiB) 
Total Ram:       8956 B (8.75 KiB) 
    Activations: 6976 B (6.81 KiB) 
    Library:     1980 B (1.93 KiB) 
    Input:       288 B (included in Activations) 
    Output:      20 B (included in Activations) 
Done 
Analyze complete on AI model

 

7.그래프

 

 



Analyzing model 
C:/Users/Owner/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/7.2.0/Utilities/windows/stm32ai analyze --name network -m E:/tmp2/contest/cubeai/en.fp-ai-sensing1/STM32CubeFunctionPack_SENSING1_V4.0.3/Utilities/AI_Ressources/models/cnn_gmp.h5 --type keras --compression none --verbosity 1 --workspace C:\Users\Owner\AppData\Local\Temp\mxAI_workspace398348037730015289195114066522834 --output C:\Users\Owner\.stm32cubemx\network_output --allocate-inputs --allocate-outputs  
Neural Network Tools for STM32AI v1.6.0 (STM.ai v7.2.0-RC5) 
  
 Exec/report summary (analyze) 
 ------------------------------------------------------------------------------------------------------------------------ 
 model file           : E:\tmp2\contest\cubeai\en.fp-ai-sensing1\STM32CubeFunctionPack_SENSING1_V4.0.3\Utilities\AI_Ressources\models\cnn_gmp.h5 
 type                 : keras 
 c_name               : network 
 compression          : none 
 allocator strategy   : ['allocate-inputs', 'allocate-outputs'] 
 workspace dir        : C:\Users\Owner\AppData\Local\Temp\mxAI_workspace398348037730015289195114066522834 
 output dir           : C:\Users\Owner\.stm32cubemx\network_output 
 model_name           : cnn_gmp 
 model_hash           : 954164d0a35496bd293bb6b3429c6a79 
 input 1/1            : 'input_0' 
                        72 items, 288 B, ai_float, float, (1,24,3,1), domain:activations/**default** 
 output 1/1           : 'softmax_1' 
                        5 items, 20 B, ai_float, float, (1,1,1,5), domain:activations/**default** 
 params #             : 1,477 items (5.77 KiB) 
 macc                 : 68,928 
 weights (ro)         : 5,908 B (5.77 KiB) (1 segment) 
 activations (rw)     : 6,976 B (6.81 KiB) (1 segment) * 
 ram (total)          : 6,976 B (6.81 KiB) = 6,976 + 0 + 0 
  
 (*) input/output buffers can be used from the activations buffer 
  
 Model name - cnn_gmp ['input_0'] ['softmax_1'] 
 --------------------------------------------------------------------------------------------------------- 
 id   layer (original)                  oshape                   param/size    macc     connected to      
 --------------------------------------------------------------------------------------------------------- 
 0    input_0 (None)                    [b:None,h:24,w:3,c:1]                                             
      quantize_1_conv2d (Conv2D)        [b:None,h:20,w:3,c:16]   96/384        4,816    input_0           
      quantize_1 (Conv2D)               [b:None,h:20,w:3,c:16]                 960      quantize_1_conv2d 
 --------------------------------------------------------------------------------------------------------- 
 1    quantize_2_conv2d (Conv2D)        [b:None,h:16,w:3,c:16]   1,296/5,184   61,456   quantize_1        
      quantize_2 (Conv2D)               [b:None,h:16,w:3,c:16]                 768      quantize_2_conv2d 
 --------------------------------------------------------------------------------------------------------- 
 2    quantize_3 (GlobalMaxPooling2D)   [b:None,h:1,w:1,c:16]                  768      quantize_2        
 --------------------------------------------------------------------------------------------------------- 
 3    quantize_4_dense (Dense)          [b:None,h:1,w:1,c:5]     85/340        85       quantize_3        
 --------------------------------------------------------------------------------------------------------- 
 4    softmax_1 (Softmax)               [b:None,h:1,w:1,c:5]                   75       quantize_4_dense  
 --------------------------------------------------------------------------------------------------------- 
 model/c-model: macc=68,928/68,928  weights=5,908/5,908  activations=--/6,976 io=--/0 
  
 Number of operations per c-layer 
 ------------------------------------------------------------------------------------- 
 c_id    m_id   name (type)                            #op (type)                     
 ------------------------------------------------------------------------------------- 
 0       0      quantize_1_conv2d (conv2d)                       5,776 (smul_f32_f32) 
 1       2      quantize_2_conv2d (optimized_conv2d)            62,992 (smul_f32_f32) 
 2       3      quantize_4_dense (dense)                            85 (smul_f32_f32) 
 3       4      softmax_1 (nl)                                      75 (op_f32_f32)   
 ------------------------------------------------------------------------------------- 
 total                                                          68,928                
  
   Number of operation types 
   --------------------------------------------- 
   smul_f32_f32              68,853       99.9% 
   op_f32_f32                    75        0.1% 
  
 Complexity report (model) 
 ----------------------------------------------------------------------------------- 
 m_id   name               c_macc                    c_rom                     c_id 
 ----------------------------------------------------------------------------------- 
 0      input_0            ||                 8.4%   ||                 6.5%   [0]  
 2      quantize_3         ||||||||||||||||  91.4%   ||||||||||||||||  87.7%   [1]  
 3      quantize_4_dense   |                  0.1%   |                  5.8%   [2]  
 4      softmax_1          |                  0.1%   |                  0.0%   [3]  
 ----------------------------------------------------------------------------------- 
 macc=68,928 weights=5,908 act=6,976 ram_io=0 
Creating txt report file C:\Users\Owner\.stm32cubemx\network_output\network_analyze_report.txt 
elapsed time (analyze): 1.790s 
Getting Flash and Ram size used by the library 
Model file:      cnn_gmp.h5 
Total Flash:     24356 B (23.79 KiB) 
    Weights:     5908 B (5.77 KiB) 
    Library:     18448 B (18.02 KiB) 
Total Ram:       8956 B (8.75 KiB) 
    Activations: 6976 B (6.81 KiB) 
    Library:     1980 B (1.93 KiB) 
    Input:       288 B (included in Activations) 
    Output:      20 B (included in Activations) 
Done 
Analyze complete on AI model

 

이상입니다 

 

첨부파일
network_analyze_report.txt 다운로드

로그인 후
참가 상태를 확인할 수 있습니다.