comparison deep/stacked_dae/v_sylvain/sgd_optimization.py @ 331:c2331b8e4b89

Ajout d'une ligne faisant rapetisser le finetune_lr pour NIST lorsqu'on a P07+NIST
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Wed, 14 Apr 2010 10:17:33 -0400
parents 18dc860a4ef4
children a79db7cee035
comparison
equal deleted inserted replaced
330:18dc860a4ef4 331:c2331b8e4b89
200 epoch = 0 200 epoch = 0
201 201
202 total_mb_index = 0 202 total_mb_index = 0
203 minibatch_index = 0 203 minibatch_index = 0
204 parameters_finetune=[] 204 parameters_finetune=[]
205 learning_rate = self.hp.finetuning_lr #The initial finetune lr 205
206 if ind_test == 21:
207 learning_rate = self.hp.finetuning_lr / 10.0
208 else:
209 learning_rate = self.hp.finetuning_lr #The initial finetune lr
206 210
207 211
208 while (epoch < num_finetune) and (not done_looping): 212 while (epoch < num_finetune) and (not done_looping):
209 epoch = epoch + 1 213 epoch = epoch + 1
210 214
318 if special == 1: #To keep a track of the value of the parameters 322 if special == 1: #To keep a track of the value of the parameters
319 f = open('params_finetune_stanford.txt', 'w') 323 f = open('params_finetune_stanford.txt', 'w')
320 pickle.dump(parameters_finetune,f) 324 pickle.dump(parameters_finetune,f)
321 f.close() 325 f.close()
322 326
323 elif ind_test== 0: #To keep a track of the value of the parameters 327 elif ind_test == 0 | ind_test == 20: #To keep a track of the value of the parameters
324 f = open('params_finetune_P07.txt', 'w') 328 f = open('params_finetune_P07.txt', 'w')
325 pickle.dump(parameters_finetune,f) 329 pickle.dump(parameters_finetune,f)
326 f.close() 330 f.close()
331
327 332
328 elif ind_test== 1: #For the run with 2 finetunes. It will be faster. 333 elif ind_test== 1: #For the run with 2 finetunes. It will be faster.
329 f = open('params_finetune_NIST.txt', 'w') 334 f = open('params_finetune_NIST.txt', 'w')
330 pickle.dump(parameters_finetune,f) 335 pickle.dump(parameters_finetune,f)
331 f.close() 336 f.close()