kaknikhil commented on a change in pull request #451: DL: Update evaluate and 
predict for multi model outputs
URL: https://github.com/apache/madlib/pull/451#discussion_r338187317
 
 

 ##########
 File path: 
src/ports/postgres/modules/deep_learning/test/madlib_keras_evaluate.sql_in
 ##########
 @@ -59,3 +61,44 @@ ALTER TABLE keras_saved_out DROP COLUMN model_arch;
 SELECT assert(trap_error($TRAP$
        SELECT madlib_keras_evaluate('keras_saved_out', 'cifar_10_sample_val', 
'evaluate_out');
        $TRAP$) = 1, 'Should error out if model_arch column is missing from 
model_table');
+
+
+
+m4_changequote(`<!', `!>')
+m4_ifdef(<!__POSTGRESQL__!>, <!!>, <!
+
+DROP TABLE IF EXISTS mst_table, mst_table_summary;
+SELECT load_model_selection_table(
+    'model_arch',
+    'mst_table',
+    ARRAY[1],
+    ARRAY[
+        
$$loss='categorical_crossentropy',optimizer='Adam(lr=0.1)',metrics=['accuracy']$$,
+        $$loss='categorical_crossentropy', 
optimizer='Adam(lr=0.01)',metrics=['accuracy']$$,
+        
$$loss='categorical_crossentropy',optimizer='Adam(lr=0.001)',metrics=['accuracy']$$
+    ],
+    ARRAY[
+        $$batch_size=5,epochs=1$$,
+        $$batch_size=10,epochs=1$$
+    ]
+);
+
+DROP TABLE if exists cifar_10_multiple_model, cifar_10_multiple_model_summary,
+                     cifar_10_multiple_model_info;
+SELECT setseed(0);
+SELECT madlib_keras_fit_multiple_model(
+    'cifar_10_sample_batched',
+    'cifar_10_multiple_model',
+    'mst_table',
+    6,
+    0
+);
+
+DROP TABLE IF EXISTS evaluate_out;
+SELECT madlib_keras_evaluate('cifar_10_multiple_model', 'cifar_10_sample_val', 
'evaluate_out', 0, 1);
+SELECT assert(loss IS NOT NULL AND
 
 Review comment:
   yeah sure while we are at it 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to