comparison 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
comparison
equal deleted inserted replaced
293:d89820070ea0 294:8babd43235dd
58 sys.stdout.flush() 58 sys.stdout.flush()
59 do_pretrain(pretrain_fs, state.pretrain_rounds, series['recons_error']) 59 do_pretrain(pretrain_fs, state.pretrain_rounds, series['recons_error'])
60 60
61 print "training ..." 61 print "training ..."
62 sys.stdout.flush() 62 sys.stdout.flush()
63 sgd_opt(train, valid, test, training_epochs=100000, patience=10000, 63 best_valid, test_score = sgd_opt(train, valid, test,
64 patience_increase=2., improvement_threshold=0.995, 64 training_epochs=100000, patience=10000,
65 validation_frequency=1000, series=series, net=net) 65 patience_increase=2.,
66 improvement_threshold=0.995,
67 validation_frequency=1000,
68 series=series, net=net)
69 state.best_valid = best_valid
70 state.test_score = test_score
71 channel.save()
72 return channel.COMPLETE
66 73
67 if __name__ == '__main__': 74 if __name__ == '__main__':
68 st = dumb() 75 st = dumb()
69 st.bsize = 100 76 st.bsize = 100
70 st.pretrain_lr = 0.01 77 st.pretrain_lr = 0.01