Skip to content

Commit a8ee2e6

Browse files
committed
removed the expected time from the tutorial code. Now into test.py:speed
1 parent d16eba9 commit a8ee2e6

7 files changed

Lines changed: 10 additions & 10 deletions

File tree

code/DBN.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def test_DBN( finetune_lr = 0.1, pretraining_epochs = 10, \
297297
print 'Pre-training layer %i, epoch %d, cost '%(i,epoch),numpy.mean(c)
298298

299299
end_time = time.clock()
300-
print >> sys.stderr, ('The pretraining code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected Xm our buildbot' % ((end_time-start_time)/60.))
300+
print >> sys.stderr, ('The pretraining code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % ((end_time-start_time)/60.))
301301

302302
########################
303303
# FINETUNING THE MODEL #
@@ -376,7 +376,7 @@ def test_DBN( finetune_lr = 0.1, pretraining_epochs = 10, \
376376
print(('Optimization complete with best validation score of %f %%,'
377377
'with test performance %f %%') %
378378
(best_validation_loss * 100., test_score*100.))
379-
print >> sys.stderr, ('The fine tuning code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected Xm our buildbot' % ((end_time-start_time)/60.))
379+
print >> sys.stderr, ('The fine tuning code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % ((end_time-start_time)/60.))
380380

381381

382382

code/SdA.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def test_SdA( finetune_lr = 0.1, pretraining_epochs = 15, \
349349

350350
end_time = time.clock()
351351

352-
print >> sys.stderr, ('The pretraining code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected 4.58m in our buildbot' % ((end_time-start_time)/60.))
352+
print >> sys.stderr, ('The pretraining code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % ((end_time-start_time)/60.))
353353

354354
########################
355355
# FINETUNING THE MODEL #
@@ -426,7 +426,7 @@ def test_SdA( finetune_lr = 0.1, pretraining_epochs = 15, \
426426
print(('Optimization complete with best validation score of %f %%,'
427427
'with test performance %f %%') %
428428
(best_validation_loss * 100., test_score*100.))
429-
print >> sys.stderr, ('The training code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected 3.91m in our buildbot' % ((end_time-start_time)/60.))
429+
print >> sys.stderr, ('The training code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % ((end_time-start_time)/60.))
430430

431431

432432

code/convolutional_mlp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def evaluate_lenet5(learning_rate=0.1, n_epochs=200, dataset='../data/mnist.pkl.
282282
print('Best validation score of %f %% obtained at iteration %i,'\
283283
'with test performance %f %%' %
284284
(best_validation_loss * 100., best_iter, test_score*100.))
285-
print >> sys.stderr, ('The code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected 2.51m in our buildbot' % ((end_time-start_time)/60.))
285+
print >> sys.stderr, ('The code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % ((end_time-start_time)/60.))
286286

287287
if __name__ == '__main__':
288288
evaluate_lenet5()

code/dA.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def test_dA( learning_rate = 0.1, training_epochs = 15, dataset ='../data/mnist.
285285

286286
training_time = (end_time - start_time)
287287

288-
print >> sys.stderr, ('The no corruption code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected 1.17m our buildbot' % ((training_time)/60.))
288+
print >> sys.stderr, ('The no corruption code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % ((training_time)/60.))
289289
image = PIL.Image.fromarray(tile_raster_images( X = da.W.value.T,
290290
img_shape = (28,28),tile_shape = (10,10),
291291
tile_spacing=(1,1)))
@@ -327,7 +327,7 @@ def test_dA( learning_rate = 0.1, training_epochs = 15, dataset ='../data/mnist.
327327

328328
training_time = (end_time - start_time)
329329

330-
print >> sys.stderr, ('The 30% corruption code for file '+os.path.split(__file__)[1]+' ran for %.2fm expected 1.18m our buildbot' % (training_time/60.))
330+
print >> sys.stderr, ('The 30% corruption code for file '+os.path.split(__file__)[1]+' ran for %.2fm' % (training_time/60.))
331331

332332
image = PIL.Image.fromarray(tile_raster_images( X = da.W.value.T,
333333
img_shape = (28,28),tile_shape = (10,10),

code/logistic_cg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def callback(theta_value):
302302
'test performance %f %%') %
303303
(validation_scores[0]*100., validation_scores[1]*100.))
304304

305-
print >> sys.stderr, ('The code for file '+os.path.split(__file__)[1]+' ran for %.1fs expected 6.8s in our buildbot' % ((end_time-start_time)))
305+
print >> sys.stderr, ('The code for file '+os.path.split(__file__)[1]+' ran for %.1fs' % ((end_time-start_time)))
306306

307307

308308
if __name__ == '__main__':

code/logistic_sgd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ def sgd_optimization_mnist(learning_rate=0.13, n_epochs=1000, dataset='../data/m
341341
'with test performance %f %%') %
342342
(best_validation_loss * 100., test_score*100.))
343343
print 'The code run for %d epochs, with %f epochs/sec'%(epoch,1.*epoch/(end_time-start_time))
344-
print >> sys.stderr, ('The code for file '+os.path.split(__file__)[1]+' ran for %.1fs expected 3.8s in our buildbot' % ((end_time-start_time)))
344+
print >> sys.stderr, ('The code for file '+os.path.split(__file__)[1]+' ran for %.1fs' % ((end_time-start_time)))
345345

346346
if __name__ == '__main__':
347347
sgd_optimization_mnist()

code/mlp.py

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

350350

351351
if __name__ == '__main__':

0 commit comments

Comments
 (0)