You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@madlib.apache.org by GitBox <gi...@apache.org> on 2019/06/08 00:14:52 UTC

[GitHub] [madlib] fmcquillan99 commented on issue #409: DL: Add online docs for madlib_keras functions

fmcquillan99 commented on issue #409: DL: Add online docs for madlib_keras functions
URL: https://github.com/apache/madlib/pull/409#issuecomment-500075322
 
 
   
   
   (1)
   all of the output table descriptions for fit, evaluate and predict
   could use a line space and better formatting like the other DL docs
   
   i.e., is hard to read:
   {code}
   The output table ('model' above) contains the following columns:  
    model_data: Byte array containing the weights of the neural net.              
    model_arch: A JSON representation of the model architecture used in           
                training.                                                         
   {code}
   
   
   
   {code}
   select madlib.madlib_keras_fit('usage');
                                  madlib_keras_fit                                
   -------------------------------------------------------------------------------
                                                                                  
    -----------------------------------------------------------------------       
                                USAGE                                             
    -----------------------------------------------------------------------       
     SELECT madlib.madlib_keras_fit(                                              
        source_table,               --  Name of the table containing the          
                                        training data                             
        model,                      --  Name of the output table containing       
                                        the model                                 
        model_arch_table,           --  Name of the table containing the          
                                        model architecture                        
        model_arch_id,              --  This is the id in 'model_arch_table'      
                                        containing the model architecture         
        compile_params,             --  Parameters passed to the compile          
                                        method of the Keras model class           
        fit_params,                 --  Parameters passed to the fit method       
                                        of the Keras model class                  
        num_iterations,             --  Number of iterations to train.            
        gpus_per_host,              --  Number of GPUs per segment host to        
                                        be used for training                      
        validation_table,           --  Name of the table containing              
                                        the validation dataset                    
        metrics_compute_frequency,  --  Frequency to compute per-iteration        
                                        metrics                                   
        warm_start,                 --  Flag to enable warm start                 
        name,                       --  Free text string to identify a name       
        description                 --  Free text string to provide a description 
        )                                                                         
     );                                                                           
                                                                                  
    -----------------------------------------------------------------------       
                                OUTPUT                                            
    -----------------------------------------------------------------------       
    The output table ('model' above) contains the following columns:              
    model_data: Byte array containing the weights of the neural net.              
    model_arch: A JSON representation of the model architecture used in           
                training.                                                         
                                                                                  
    A summary table ('<model>_summary') is created to store various training      
    statistics as well as the input parameters.  
   {code}
   
   (2)
   missing params
   
   {code}
   madlib=# select madlib.load_keras_model('usage');
                                        load_keras_model                                     
   ------------------------------------------------------------------------------------------
                                                                                             
            ---------------------------------------------------------------------------      
                                            USAGE                                            
            ---------------------------------------------------------------------------      
            SELECT madlib.load_keras_model(                                                  
                keras_model_arch_table VARCHAR, -- Output table to load keras model arch.    
                model_arch             JSON     -- JSON of the model architecture to insert. 
            );                                                                               
                                                                                             
                                                                                             
            ---------------------------------------------------------------------------      
                                            OUTPUT                                           
            ---------------------------------------------------------------------------      
            The output table produced by load_keras_model contains the following columns:    
                                                                                             
            'model_id'                -- SERIAL PRIMARY KEY. Model ID.                       
            'model_arch'              -- JSON. JSON blob of the model architecture.          
            'model_weights'           -- bytea. weights of the model for warm start.         
            '__internal_madlib_id__'  -- TEXT. Unique id for model arch.                     
   {code}
   The usage is missing some parameters:                                                                                      
   {code}
   CREATE OR REPLACE FUNCTION MADLIB_SCHEMA.load_keras_model(
       keras_model_arch_table VARCHAR,
       model_arch             JSON,
       model_weights          bytea,
       name                   TEXT,
       description            TEXT
   )
   {code}
   I will update the user docs probably on Mon if you want to wait and copy after I do that.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services