Mercurial > ift6266
comparison deep/convolutional_dae/salah_exp/nist_csda.py @ 364:c05680f8c92f
Fixing a wrong commit and committing more files.
author | humel |
---|---|
date | Thu, 22 Apr 2010 19:50:21 -0400 |
parents | 31641a84e0ae |
children |
comparison
equal
deleted
inserted
replaced
358:31641a84e0ae | 364:c05680f8c92f |
---|---|
119 | 119 |
120 #Decide how the finetune is done | 120 #Decide how the finetune is done |
121 | 121 |
122 if finetune_choice == 0: | 122 if finetune_choice == 0: |
123 print('\n\n\tfinetune with NIST\n\n') | 123 print('\n\n\tfinetune with NIST\n\n') |
124 optimizer.reload_parameters('params_pretrain.txt') | |
125 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,decrease=decrease_lr) | 124 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,decrease=decrease_lr) |
126 channel.save() | 125 channel.save() |
127 if finetune_choice == 1: | 126 if finetune_choice == 1: |
128 print('\n\n\tfinetune with P07\n\n') | 127 print('\n\n\tfinetune with P07\n\n') |
129 optimizer.reload_parameters('params_pretrain.txt') | |
130 optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=0,decrease=decrease_lr) | 128 optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=0,decrease=decrease_lr) |
131 channel.save() | 129 channel.save() |
132 if finetune_choice == 2: | 130 if finetune_choice == 2: |
133 print('\n\n\tfinetune with P07 followed by NIST\n\n') | 131 print('\n\n\tfinetune with P07 followed by NIST\n\n') |
134 optimizer.reload_parameters('params_pretrain.txt') | |
135 optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=20,decrease=decrease_lr) | 132 optimizer.finetune(datasets.nist_P07(),datasets.nist_all(),max_finetune_epoch_P07,ind_test=20,decrease=decrease_lr) |
136 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=21,decrease=decrease_lr) | 133 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=21,decrease=decrease_lr) |
137 channel.save() | 134 channel.save() |
138 if finetune_choice == 3: | 135 if finetune_choice == 3: |
139 print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\ | 136 print('\n\n\tfinetune with NIST only on the logistic regression on top (but validation on P07).\n\ |
140 All hidden units output are input of the logistic regression\n\n') | 137 All hidden units output are input of the logistic regression\n\n') |
141 optimizer.reload_parameters('params_pretrain.txt') | |
142 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr) | 138 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,special=1,decrease=decrease_lr) |
143 | 139 |
144 | 140 |
145 if finetune_choice==-1: | 141 if finetune_choice==-1: |
146 print('\nSERIE OF 4 DIFFERENT FINETUNINGS') | 142 print('\nSERIE OF 4 DIFFERENT FINETUNINGS') |
147 print('\n\n\tfinetune with NIST\n\n') | 143 print('\n\n\tfinetune with NIST\n\n') |
148 sys.stdout.flush() | 144 sys.stdout.flush() |
149 optimizer.reload_parameters('params_pretrain.txt') | |
150 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,decrease=decrease_lr) | 145 optimizer.finetune(datasets.nist_all(),datasets.nist_P07(),max_finetune_epoch_NIST,ind_test=1,decrease=decrease_lr) |
151 channel.save() | 146 channel.save() |
152 print('\n\n\tfinetune with P07\n\n') | 147 print('\n\n\tfinetune with P07\n\n') |
153 sys.stdout.flush() | 148 sys.stdout.flush() |
154 optimizer.reload_parameters('params_pretrain.txt') | 149 optimizer.reload_parameters('params_pretrain.txt') |