diff deep/stacked_dae/v_sylvain/nist_sda.py @ 319:7a12d2c3d06b

finetune NIST+P07 change pour P07+NIST, les experiences n'ont pas ete concluentes
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Fri, 02 Apr 2010 14:53:32 -0400
parents 8de3bef71458
children 4306796d60a8
line wrap: on
line diff
--- a/deep/stacked_dae/v_sylvain/nist_sda.py	Fri Apr 02 09:12:40 2010 -0400
+++ b/deep/stacked_dae/v_sylvain/nist_sda.py	Fri Apr 02 14:53:32 2010 -0400
@@ -124,10 +124,10 @@
         optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=0)
         channel.save()
     if finetune_choice == 2:
-        print('\n\n\tfinetune with NIST followed by P07\n\n')
+        print('\n\n\tfinetune with P07 followed by NIST\n\n')
         optimizer.reload_parameters('params_pretrain.txt')
+        optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=20)
         optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=21)
-        optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=20)
         channel.save()
     if finetune_choice == 3:
         print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\
@@ -148,10 +148,10 @@
         optimizer.reload_parameters('params_pretrain.txt')
         optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=0)
         channel.save()
-        print('\n\n\tfinetune with NIST (done earlier) followed by P07 (written here)\n\n')
+        print('\n\n\tfinetune with P07 (done earlier) followed by NIST (written here)\n\n')
         sys.stdout.flush()
-        optimizer.reload_parameters('params_finetune_NIST.txt')
-        optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=20)
+        optimizer.reload_parameters('params_finetune_P07.txt')
+        optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=21)
         channel.save()
         print('\n\n\tfinetune with NIST only on the logistic regression on top.\n\
         All hidden units output are input of the logistic regression\n\n')