# HG changeset patch # User Arnaud Bergeron # Date 1269711588 14400 # Node ID 8babd43235ddc2d3b9b06f4666f95d09fac77bfa # Parent d89820070ea0048506911b17f0c243a31a6b51ce Save best valid score and test score in the db. diff -r d89820070ea0 -r 8babd43235dd deep/convolutional_dae/run_exp.py --- 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() diff -r d89820070ea0 -r 8babd43235dd deep/convolutional_dae/sgd_opt.py --- a/deep/convolutional_dae/sgd_opt.py Fri Mar 26 19:18:03 2010 -0400 +++ b/deep/convolutional_dae/sgd_opt.py Sat Mar 27 13:39:48 2010 -0400 @@ -1,5 +1,5 @@ import time -import sys +import sys, os from ift6266.utils.seriestables import * @@ -63,3 +63,4 @@ (best_validation_loss * 100., test_score*100.)) print ('The code ran for %f minutes' % ((end_time-start_time)/60.)) + return best_validation_loss, test_score