@@ -300,7 +300,7 @@ def errors(self, y):
300300
301301
302302
303- def sgd_optimization_mnist ( learning_rate = 0.01 , pretraining_epochs = 10 , \
303+ def sgd_optimization_mnist ( learning_rate = 0.1 , pretraining_epochs = 20 , \
304304 pretraining_lr = 0.1 , n_iter = 1000 , dataset = 'mnist.pkl.gz' ):
305305 """
306306 Demonstrate stochastic gradient descent optimization for a multilayer
@@ -337,7 +337,7 @@ def shared_dataset(data_xy):
337337 valid_set_x , valid_set_y = shared_dataset (valid_set )
338338 train_set_x , train_set_y = shared_dataset (train_set )
339339
340- batch_size = 500 # size of the minibatch
340+ batch_size = 20 # size of the minibatch
341341
342342 # compute number of minibatches for training, validation and testing
343343 n_train_batches = train_set_x .value .shape [0 ] / batch_size
@@ -355,7 +355,7 @@ def shared_dataset(data_xy):
355355
356356 # construct the logistic regression class
357357 classifier = SdA ( input = x , n_ins = 28 * 28 , \
358- hidden_layers_sizes = [500 , 500 , 500 ], n_outs = 10 )
358+ hidden_layers_sizes = [700 , 700 , 700 ], n_outs = 10 )
359359
360360 ## Pre-train layer-wise
361361 for i in xrange (classifier .n_layers ):
0 commit comments