From 2bd0018f1e0cd40473b6f82c687f4d35bcd07f4c Mon Sep 17 00:00:00 2001 From: Pascal Lamblin Date: Wed, 27 Mar 2013 19:25:49 -0400 Subject: [PATCH 1/3] Also report best_iter + 1 as best iteration --- code/convolutional_mlp.py | 2 +- code/mlp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/convolutional_mlp.py b/code/convolutional_mlp.py index 884e3b9a..8a3a7e6c 100644 --- a/code/convolutional_mlp.py +++ b/code/convolutional_mlp.py @@ -290,7 +290,7 @@ def evaluate_lenet5(learning_rate=0.1, n_epochs=200, print('Optimization complete.') print('Best validation score of %f %% obtained at iteration %i,'\ 'with test performance %f %%' % - (best_validation_loss * 100., best_iter, test_score * 100.)) + (best_validation_loss * 100., best_iter + 1, test_score * 100.)) print >> sys.stderr, ('The code for file ' + os.path.split(__file__)[1] + ' ran for %.2fm' % ((end_time - start_time) / 60.)) diff --git a/code/mlp.py b/code/mlp.py index 72a6d8eb..a9c5dc85 100644 --- a/code/mlp.py +++ b/code/mlp.py @@ -348,7 +348,7 @@ def test_mlp(learning_rate=0.01, L1_reg=0.00, L2_reg=0.0001, n_epochs=1000, end_time = time.clock() print(('Optimization complete. Best validation score of %f %% ' 'obtained at iteration %i, with test performance %f %%') % - (best_validation_loss * 100., best_iter, test_score * 100.)) + (best_validation_loss * 100., best_iter + 1, test_score * 100.)) print >> sys.stderr, ('The code for file ' + os.path.split(__file__)[1] + ' ran for %.2fm' % ((end_time - start_time) / 60.)) From 3431a7b5ebb226538a8368e30a058909a1244f8f Mon Sep 17 00:00:00 2001 From: Pascal Lamblin Date: Wed, 27 Mar 2013 19:35:02 -0400 Subject: [PATCH 2/3] Fix output of modified script. --- doc/mlp.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/mlp.txt b/doc/mlp.txt index 0dcf76fe..20794335 100644 --- a/doc/mlp.txt +++ b/doc/mlp.txt @@ -350,12 +350,12 @@ The output one should expect is of the form : .. code-block:: bash - Optimization complete with best validation score of 2.08%, with test performance 2.18% - The code ran for 55.57 minutes + Optimization complete. Best validation score of 1.690000 % obtained at iteration 2070000, with test performance 1.650000 % + The code for file mlp.py ran for 97.34m -On an Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00 Ghz the code runs with -approximately 1.78 epoch/minute and it took 99 epochs to reach a test -error of 2.18%. +On an Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz the code runs with +approximately 10.3 epoch/minute and it took 828 epochs to reach a test +error of 1.65%. To put this into perspective, we refer the reader to the results section of `this `_ page. From d8860cf2b62e24e879ac8298191a4e826cb5b03b Mon Sep 17 00:00:00 2001 From: Pascal Lamblin Date: Wed, 27 Mar 2013 19:45:10 -0400 Subject: [PATCH 3/3] Revert change that should not have been committed --- code/convolutional_mlp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/convolutional_mlp.py b/code/convolutional_mlp.py index 8a3a7e6c..0e32e37e 100644 --- a/code/convolutional_mlp.py +++ b/code/convolutional_mlp.py @@ -296,7 +296,7 @@ def evaluate_lenet5(learning_rate=0.1, n_epochs=200, ' ran for %.2fm' % ((end_time - start_time) / 60.)) if __name__ == '__main__': - evaluate_lenet5(n_epochs=1, batch_size=1) + evaluate_lenet5() def experiment(state, channel):