comparison deep/stacked_dae/v_sylvain/nist_sda_retrieve.py @ 387:44094ff28ed1

Ajout d'une option finetune amelioree pour PNIST07
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Tue, 27 Apr 2010 08:41:58 -0400
parents 5c3935aa3f8a
children d76c85ba12d6
comparison
equal deleted inserted replaced
386:8875853b5bfc 387:44094ff28ed1
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 if finetune_choice == 4: 150 if finetune_choice == 4:
151 print ('\n\n\tFinetune with PNIST07\n\n') 151 print ('\n\n\tFinetune with PNIST07\n\n')
152 optimizer.reload_parameters(PATH+'params_pretrain.txt') 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()) 153 optimizer.finetune(datasets.PNIST07(),datasets.nist_all(),max_finetune_epoch_NIST,ind_test=2,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
154 154 optimizer.finetune(datasets.nist_all(),datasets.PNIST07(),max_finetune_epoch_NIST,ind_test=31,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
155 155
156 if finetune_choice==-1: 156 if finetune_choice==-1:
157 print('\nSERIE OF 4 DIFFERENT FINETUNINGS') 157 print('\nSERIE OF 4 DIFFERENT FINETUNINGS')
158 print('\n\n\tfinetune with NIST\n\n') 158 print('\n\n\tfinetune with NIST\n\n')
159 sys.stdout.flush() 159 sys.stdout.flush()
178 channel.save() 178 channel.save()
179 print ('\n\n\tFinetune with PNIST07\n\n') 179 print ('\n\n\tFinetune with PNIST07\n\n')
180 sys.stdout.flush() 180 sys.stdout.flush()
181 optimizer.reload_parameters(PATH+'params_pretrain.txt') 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()) 182 optimizer.finetune(datasets.PNIST07(),datasets.nist_all(),max_finetune_epoch_NIST,ind_test=2,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
183 channel.save()
184 sys.stdout.flush()
185 optimizer.finetune(datasets.nist_all(),datasets.PNIST07(),max_finetune_epoch_NIST,ind_test=31,decrease=decrease_lr,dataset_test2=datasets.nist_P07())
183 186
184 187
185 channel.save() 188 channel.save()
186 189
187 return channel.COMPLETE 190 return channel.COMPLETE