# HG changeset patch # User SylvainPL # Date 1269457138 14400 # Node ID 28b628f331b2ff6a99e76089dc4117460e61b616 # Parent 698313f8f6e6a42b263de9213c324996e8b22b69 correction d'un bug sur l'indice des mini-batches diff -r 698313f8f6e6 -r 28b628f331b2 deep/stacked_dae/v_sylvain/sgd_optimization.py --- a/deep/stacked_dae/v_sylvain/sgd_optimization.py Wed Mar 24 14:45:02 2010 -0400 +++ b/deep/stacked_dae/v_sylvain/sgd_optimization.py Wed Mar 24 14:58:58 2010 -0400 @@ -195,10 +195,11 @@ epoch = 0 total_mb_index = 0 + minibatch_index = -1 while (epoch < num_finetune) and (not done_looping): epoch = epoch + 1 - minibatch_index = -1 + for x,y in dataset.train(minibatch_size): minibatch_index += 1 if special == 0: @@ -210,7 +211,7 @@ self.series["training_error"].append((epoch, minibatch_index), cost_ij) if (total_mb_index+1) % validation_frequency == 0: - + #minibatch_index += 1 #The validation set is always NIST if ind_test == 0: iter=dataset_test.valid(minibatch_size)