diff deep/convolutional_dae/run_exp.py @ 294:8babd43235dd

Save best valid score and test score in the db.
author Arnaud Bergeron <abergeron@gmail.com>
date Sat, 27 Mar 2010 13:39:48 -0400
parents d89820070ea0
children a222af1d0598
line wrap: on
line diff
--- a/deep/convolutional_dae/run_exp.py	Fri Mar 26 19:18:03 2010 -0400
+++ b/deep/convolutional_dae/run_exp.py	Sat Mar 27 13:39:48 2010 -0400
@@ -60,9 +60,16 @@
 
     print "training ..."
     sys.stdout.flush()
-    sgd_opt(train, valid, test, training_epochs=100000, patience=10000,
-            patience_increase=2., improvement_threshold=0.995,
-            validation_frequency=1000, series=series, net=net)
+    best_valid, test_score = sgd_opt(train, valid, test,
+                                     training_epochs=100000, patience=10000,
+                                     patience_increase=2.,
+                                     improvement_threshold=0.995,
+                                     validation_frequency=1000,
+                                     series=series, net=net)
+    state.best_valid = best_valid
+    state.test_score = test_score
+    channel.save()
+    return channel.COMPLETE
 
 if __name__ == '__main__':
     st = dumb()