diff 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
line wrap: on
line diff
--- a/deep/stacked_dae/v_sylvain/train_error.py	Tue Apr 27 08:20:37 2010 -0400
+++ b/deep/stacked_dae/v_sylvain/train_error.py	Tue Apr 27 08:20:59 2010 -0400
@@ -103,6 +103,16 @@
         print "For" + str(maximum_exemples) + "over the NIST training set: "
         optimizer.training_error(datasets.nist_all(maxsize=maximum_exemples))
     
+    if os.path.exists(PATH+'params_finetune_PNIST07.txt'):
+        print ('\n finetune = PNIST07')
+        optimizer.reload_parameters(PATH+'params_finetune_PNIST07.txt')
+        print "For" + str(maximum_exemples) + "over the NIST training set: "
+        optimizer.training_error(datasets.nist_all(maxsize=maximum_exemples))
+        print "For" + str(maximum_exemples) + "over the P07 training set: "
+        optimizer.training_error(datasets.nist_P07(maxsize=maximum_exemples))
+        print "For" + str(maximum_exemples) + "over the PNIST07 training set: "
+        optimizer.training_error(datasets.PNIST07(maxsize=maximum_exemples))
+    
     channel.save()
 
     return channel.COMPLETE