comparison deep/stacked_dae/v_sylvain/nist_sda_retrieve.py @ 383:5c3935aa3f8a

Ajout de la faculte de prendre PNIST07
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Tue, 27 Apr 2010 08:20:12 -0400
parents c61b72d07676
children 44094ff28ed1
comparison
equal deleted inserted replaced
382:87e684bfe538 383:5c3935aa3f8a
145 if finetune_choice == 3: 145 if finetune_choice == 3:
146 print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\ 146 print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\
147 All hidden units output are input of the logistic regression\n\n') 147 All hidden units output are input of the logistic regression\n\n')
148 optimizer.reload_parameters(PATH+'params_pretrain.txt') 148 optimizer.reload_parameters(PATH+'params_pretrain.txt')
149 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr) 149 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr)
150 150 if finetune_choice == 4:
151 print ('\n\n\tFinetune with PNIST07\n\n')
152 optimizer.reload_parameters(PATH+'params_pretrain.txt')
153 optimizer.finetune(datasets.PNIST07(),datasets.nist_all(),max_finetune_epoch_NIST,ind_test=2,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
154
151 155
152 if finetune_choice==-1: 156 if finetune_choice==-1:
153 print('\nSERIE OF 4 DIFFERENT FINETUNINGS') 157 print('\nSERIE OF 4 DIFFERENT FINETUNINGS')
154 print('\n\n\tfinetune with NIST\n\n') 158 print('\n\n\tfinetune with NIST\n\n')
155 sys.stdout.flush() 159 sys.stdout.flush()
170 All hidden units output are input of the logistic regression\n\n') 174 All hidden units output are input of the logistic regression\n\n')
171 sys.stdout.flush() 175 sys.stdout.flush()
172 optimizer.reload_parameters(PATH+'params_pretrain.txt') 176 optimizer.reload_parameters(PATH+'params_pretrain.txt')
173 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr) 177 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr)
174 channel.save() 178 channel.save()
179 print ('\n\n\tFinetune with PNIST07\n\n')
180 sys.stdout.flush()
181 optimizer.reload_parameters(PATH+'params_pretrain.txt')
182 optimizer.finetune(datasets.PNIST07(),datasets.nist_all(),max_finetune_epoch_NIST,ind_test=2,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
183
175 184
176 channel.save() 185 channel.save()
177 186
178 return channel.COMPLETE 187 return channel.COMPLETE
179 188