comparison deep/stacked_dae/v_sylvain/nist_sda.py @ 382:87e684bfe538

Ajout de la faculte de prendre PNIST07
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Tue, 27 Apr 2010 08:18:10 -0400
parents ffc06af1c543
children 8875853b5bfc
comparison
equal deleted inserted replaced
381:0a91fc69ff90 382:87e684bfe538
142 if finetune_choice == 3: 142 if finetune_choice == 3:
143 print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\ 143 print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\
144 All hidden units output are input of the logistic regression\n\n') 144 All hidden units output are input of the logistic regression\n\n')
145 optimizer.reload_parameters('params_pretrain.txt') 145 optimizer.reload_parameters('params_pretrain.txt')
146 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr) 146 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr)
147 147 if finetune_choice == 4:
148 print ('\n\n\tFinetune with PNIST07\n\n')
149 optimizer.reload_parameters('params)pretrain.txt')
150 optimizer.finetune(datasets.PNIST07(),datasets.nist_all(),max_finetune_epoch_NIST,ind_test=2,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
148 151
149 if finetune_choice==-1: 152 if finetune_choice==-1:
150 print('\nSERIE OF 4 DIFFERENT FINETUNINGS') 153 print('\nSERIE OF 4 DIFFERENT FINETUNINGS')
151 print('\n\n\tfinetune with NIST\n\n') 154 print('\n\n\tfinetune with NIST\n\n')
152 sys.stdout.flush() 155 sys.stdout.flush()
167 All hidden units output are input of the logistic regression\n\n') 170 All hidden units output are input of the logistic regression\n\n')
168 sys.stdout.flush() 171 sys.stdout.flush()
169 optimizer.reload_parameters('params_pretrain.txt') 172 optimizer.reload_parameters('params_pretrain.txt')
170 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr) 173 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr)
171 channel.save() 174 channel.save()
175 print ('\n\n\tFinetune with PNIST07\n\n')
176 sys.stdout.flush()
177 optimizer.reload_parameters('params)pretrain.txt')
178 optimizer.finetune(datasets.PNIST07(),datasets.nist_all(),max_finetune_epoch_NIST,ind_test=2,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
179
172 180
173 channel.save() 181 channel.save()
174 182
175 return channel.COMPLETE 183 return channel.COMPLETE
176 184