Skip to content

Commit ee64525

Browse files
author
Razvan Pascanu
committed
new results for SdA
1 parent 6cff28b commit ee64525

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

code/SdA.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def test_score():
280280

281281

282282
def test_SdA( finetune_lr = 0.1, pretraining_epochs = 15, \
283-
pretrain_lr = 0.05, training_epochs = 1000, \
283+
pretrain_lr = 0.001, training_epochs = 1000, \
284284
dataset='../data/mnist.pkl.gz', batch_size = 1):
285285
"""
286286
Demonstrates how to train and test a stochastic denoising autoencoder.
@@ -316,7 +316,7 @@ def test_SdA( finetune_lr = 0.1, pretraining_epochs = 15, \
316316
n_train_batches = train_set_x.value.shape[0] / batch_size
317317

318318
# numpy random generator
319-
numpy_rng = numpy.random.RandomState(123)
319+
numpy_rng = numpy.random.RandomState(89677)
320320
print '... building the model'
321321
# construct the stacked denoising autoencoder class
322322
sda = SdA( numpy_rng = numpy_rng, n_ins = 28*28,
@@ -335,7 +335,7 @@ def test_SdA( finetune_lr = 0.1, pretraining_epochs = 15, \
335335
print '... pre-training the model'
336336
start_time = time.clock()
337337
## Pre-train layer-wise
338-
corruption_levels = [.1,.1,.0]
338+
corruption_levels = [.1,.2,.3]
339339
for i in xrange(sda.n_layers):
340340
# go through pretraining epochs
341341
for epoch in xrange(pretraining_epochs):

doc/SdA.txt

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -422,19 +422,16 @@ The user can run the code by calling:
422422

423423
python code/SdA.py
424424

425-
By default the code runs 15 pre-training epochs for each layer, with
426-
a corruption level of 0.2 and a learning rate of 0.1. Pre-training takes
427-
76.95 minutes. Fine-tuning is completed after 48 epochs in 115.73
428-
minutes and results in a validation score of 1.63 %, with a test
429-
performace of 1.68 %. These results were obtained on a machine with an Intel
425+
By default the code runs 15 pre-training epochs for each layer, with a batch
426+
size of 1. The corruption level for the first layer is 0.1, for the second
427+
0.2 and 0.3 for the third. The pretraining learning rate is was 0.001 and
428+
the finetuning learning rate is 0.1. Pre-training takes 585.01 minutes, with
429+
an average of 13 minutes per epoch. Fine-tuning is completed after 36 epochs
430+
in 444.2 minutes, with an average of 12.34 minutes per epoch. The final
431+
validation score is 1.39% with a testing score fo 1.3%.
432+
These results were obtained on a machine with an Intel
430433
Xeon E5430 @ 2.66GHz CPU, with a single-threaded GotoBLAS.
431434

432-
For comparison, on a multi-core Intel Xeon X5560 @ 2.80GHz, using multi-threaded MKL
433-
(with 8 threads), pre-training takes 23.43 minutes and fine-tuning takes 25.61 minutes,
434-
meaning a ~4x speed-up at an 8x CPU cost.
435-
436-
Timings accurate as of March 16, 2010.
437-
438435

439436
Tips and Tricks
440437
+++++++++++++++

0 commit comments

Comments
 (0)