summarize

Generate a text summary of a model.

Additional Documentation

Usage

                                                                               
 Usage: mltk summarize [OPTIONS] <model>                                       
                                                                               
 Generate a summary of a model                                                 
 If a .h5 file is provided or a MLTK model name/archive/script and *no*        
 --tflite option,                                                              
 then print a summary of the Keras Model.                                      
                                                                               
 If a .tflite file is provided or a MLTK model name/archive/script and the     
 --tflite option,                                                              
 then print a summary of the .tflite model.                                    
                                                                               
 Use the --build option if the model has not been previously trained.          
                                                                               
 For more details see:                                                         
 https://siliconlabs.github.io/mltk/docs/guides/model_summary                  
                                                                               
 ----------                                                                    
  Examples                                                                     
 ----------                                                                    
                                                                               
 # Print a summary of pre-trained Keras model                                  
 mltk summarize audio_example1                                                 
                                                                               
 # Print a summary of pre-trained TF-Lite model                                
 mltk summarize audio_example1 --tflite                                        
                                                                               
 # Generate a .tflite then print a summary                                     
 # In this case, the model need not be previously trained                      
 mltk summarize audio_example1 --build --tflite                                
                                                                               
 # Print of summary of the given .tflite                                       
 mltk summarize some/path/my_model.tflite                                      
                                                                               
 # Print of summary of the given model archive's .tflite                       
 mltk summarize some/path/my_model.mltk.zip --tflite                           
                                                                               
 Arguments 
 *    model      <model>  One of the following:                              
                          - Path to .tflite model file                       
                          - Path to .h5 model file                           
                          - Name of MLTK model                               
                          - Path to trained model's archive (.mltk.zip)      
                          - Path to MLTK model's python script               
                          [default: None]                                    
                          [required]                                         

 Options 
 --tflite                   Summarize the .tflite model file in the MLTK     
                            model's archive, or if the --build option is     
                            given, generate .tflite file before summarizing  
 --build    -b              Build the model rather than loading from a       
                            pre-trained file in the MLTK model archive       
 --output   -o      <path>  File path of generated summary file. If omitted, 
                            the summary is printed to console                
                            [default: None]                                  
 --verbose  -v              Enable verbose console logs                      
 --help                     Show this message and exit.