GeezerVison is showing github.com — added DBN results (1.34 test error) · alabarga/DeepLearningTutorials@0797aa1
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: code/DBN.py +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -231,9 +231,9 @@ def test_score(): | 231 | 231 | return train_fn, valid_score, test_score | 232 | 232 |
| 233 | 233 |
| 234 | | -def test_DBN( finetune_lr = 0.1, pretraining_epochs = 10, \ | 235 | | - pretrain_lr = 0.1, k = 1, training_epochs = 1000, \ | 236 | | - dataset='../data/mnist.pkl.gz', batch_size = 1): | | 234 | +def test_DBN( finetune_lr = 0.1, pretraining_epochs = 100, \ | | 235 | + pretrain_lr = 0.01, k = 1, training_epochs = 1000, \ | | 236 | + dataset='../data/mnist.pkl.gz', batch_size = 10): | 237 | 237 | """ | 238 | 238 | Demonstrates how to train and test a Deep Belief Network. | 239 | 239 |
| |
Collapse file Copy file name to clipboardExpand all lines: doc/DBN.txt +18-3Lines changed: 18 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -472,9 +472,24 @@ The user can run the code by calling: | 472 | 472 |
| 473 | 473 | python code/DBN.py | 474 | 474 |
| 475 | | - | 476 | | -Sampling a DBN | 477 | | -++++++++++++++ | | 475 | +With the default parameters, the code runs for 100 pre-training epochs with | | 476 | +mini-batches of size 10. This corresponds to performing 500,000 unsupervised | | 477 | +parameter updates. We use an unsupervised learning rate of 0.01, with a | | 478 | +supervised learning rate of 0.1. The DBN itself consists of three | | 479 | +hidden layers with 1000 units per layer. With early-stopping, this configuration | | 480 | +achieved a minimal validation error of 1.27 with corresponding test | | 481 | +error of 1.34 after 46 supervised epochs. | | 482 | + | | 483 | +On an Intel(R) Xeon(R) CPU X5560 running at 2.80GHz, using a multi-threaded MKL | | 484 | +library (running on 4 cores), pretraining took 615 minutes with an average of | | 485 | +2.05 mins/(layer * epoch). Fine-tuning took only 101 minutes or approximately | | 486 | +2.20 mins/epoch. | | 487 | + | | 488 | +Hyper-parameters were selected by optimizing on the validation error. We tested | | 489 | +unsupervised learning rates in :math:`\{10^{-1}, ..., 10^{-5}\}` and supervised | | 490 | +learning rates in :math:`\{10^{-1}, ..., 10^{-4}\}`. We did not use any form of | | 491 | +regularization besides early-stopping, nor did we optimize over the number of | | 492 | +pretraining updates. | 478 | 493 |
| 479 | 494 |
| 480 | 495 | Tips and Tricks | |
|