comparison deep/stacked_dae/v_sylvain/train_error.py @ 385:442fc117e886

Ajout de la faculte de prendre PNIST07
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Tue, 27 Apr 2010 08:20:59 -0400
parents b762ac18a2d7
children 0d97fead004f
comparison
equal deleted inserted replaced
384:8117c0e70db9 385:442fc117e886
101 print "For" + str(maximum_exemples) + "over the P07 training set: " 101 print "For" + str(maximum_exemples) + "over the P07 training set: "
102 optimizer.training_error(datasets.nist_P07(maxsize=maximum_exemples)) 102 optimizer.training_error(datasets.nist_P07(maxsize=maximum_exemples))
103 print "For" + str(maximum_exemples) + "over the NIST training set: " 103 print "For" + str(maximum_exemples) + "over the NIST training set: "
104 optimizer.training_error(datasets.nist_all(maxsize=maximum_exemples)) 104 optimizer.training_error(datasets.nist_all(maxsize=maximum_exemples))
105 105
106 if os.path.exists(PATH+'params_finetune_PNIST07.txt'):
107 print ('\n finetune = PNIST07')
108 optimizer.reload_parameters(PATH+'params_finetune_PNIST07.txt')
109 print "For" + str(maximum_exemples) + "over the NIST training set: "
110 optimizer.training_error(datasets.nist_all(maxsize=maximum_exemples))
111 print "For" + str(maximum_exemples) + "over the P07 training set: "
112 optimizer.training_error(datasets.nist_P07(maxsize=maximum_exemples))
113 print "For" + str(maximum_exemples) + "over the PNIST07 training set: "
114 optimizer.training_error(datasets.PNIST07(maxsize=maximum_exemples))
115
106 channel.save() 116 channel.save()
107 117
108 return channel.COMPLETE 118 return channel.COMPLETE
109 119
110 120