Skip to content

Commit a8ec4be

Browse files
committed
Merge pull request lisa-lab#20 from lisa-lab/fix_iter_index
Further fixes following lisa-labgh-19
2 parents 61c1dda + d8860cf commit a8ec4be

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

code/convolutional_mlp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,13 +290,13 @@ def evaluate_lenet5(learning_rate=0.1, n_epochs=200,
290290
print('Optimization complete.')
291291
print('Best validation score of %f %% obtained at iteration %i,'\
292292
'with test performance %f %%' %
293-
(best_validation_loss * 100., best_iter, test_score * 100.))
293+
(best_validation_loss * 100., best_iter + 1, test_score * 100.))
294294
print >> sys.stderr, ('The code for file ' +
295295
os.path.split(__file__)[1] +
296296
' ran for %.2fm' % ((end_time - start_time) / 60.))
297297

298298
if __name__ == '__main__':
299-
evaluate_lenet5(n_epochs=1, batch_size=1)
299+
evaluate_lenet5()
300300

301301

302302
def experiment(state, channel):

code/mlp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ def test_mlp(learning_rate=0.01, L1_reg=0.00, L2_reg=0.0001, n_epochs=1000,
348348
end_time = time.clock()
349349
print(('Optimization complete. Best validation score of %f %% '
350350
'obtained at iteration %i, with test performance %f %%') %
351-
(best_validation_loss * 100., best_iter, test_score * 100.))
351+
(best_validation_loss * 100., best_iter + 1, test_score * 100.))
352352
print >> sys.stderr, ('The code for file ' +
353353
os.path.split(__file__)[1] +
354354
' ran for %.2fm' % ((end_time - start_time) / 60.))

doc/mlp.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,12 +350,12 @@ The output one should expect is of the form :
350350

351351
.. code-block:: bash
352352

353-
Optimization complete with best validation score of 2.08%, with test performance 2.18%
354-
The code ran for 55.57 minutes
353+
Optimization complete. Best validation score of 1.690000 % obtained at iteration 2070000, with test performance 1.650000 %
354+
The code for file mlp.py ran for 97.34m
355355

356-
On an Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00 Ghz the code runs with
357-
approximately 1.78 epoch/minute and it took 99 epochs to reach a test
358-
error of 2.18%.
356+
On an Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz the code runs with
357+
approximately 10.3 epoch/minute and it took 828 epochs to reach a test
358+
error of 1.65%.
359359

360360
To put this into perspective, we refer the reader to the results section of `this
361361
<http://yann.lecun.com/exdb/mnist>`_ page.

0 commit comments

Comments
 (0)