Skip to content

Commit 5c852cd

Browse files
committed
added test of file dA and print the timing of the test and expected timing on our buildbot
1 parent 8555827 commit 5c852cd

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

code/test.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,33 @@
11
#import convolutional_mlp, dbn, logistic_cg, logistic_sgd, mlp, rbm, SdA_loops, SdA
2-
import convolutional_mlp, logistic_cg, logistic_sgd, mlp, SdA
2+
import convolutional_mlp, logistic_cg, logistic_sgd, mlp, SdA, dA
33
from nose.plugins.skip import SkipTest
4+
import time,sys
45
#TODO: dbn, rbm, SdA, SdA_loops, convolutional_mlp
56
def test_logistic_sgd():
7+
t0=time.time()
68
logistic_sgd.sgd_optimization_mnist(n_epochs=10)
9+
print >> sys.stderr, "test_logistic_sgd took %.3fs expected 15.2s in our buildbot"%(time.time()-t0)
710
def test_logistic_cg():
11+
t0=time.time()
812
logistic_cg.cg_optimization_mnist(n_epochs=10)
13+
print >> sys.stderr, "test_logistic_cg took %.3fs expected 14s in our buildbot"%(time.time()-t0)
914
def test_mlp():
15+
t0=time.time()
1016
mlp.test_mlp(n_epochs=5)
17+
print >> sys.stderr, "test_mlp took %.3fs expected 118s in our buildbot"%(time.time()-t0)
1118
def test_convolutional_mlp():
19+
t0=time.time()
1220
convolutional_mlp.evaluate_lenet5(n_epochs=5,nkerns=[5,5])
21+
print >> sys.stderr, "test_convolutional_mlp took %.3fs expected 168s in our buildbot"%(time.time()-t0)
1322
def test_dbn():
1423
raise SkipTest('Implementation not finished')
1524
def test_rbm():
1625
raise SkipTest('Implementation not finished')
26+
def test_dA():
27+
t0=time.time()
28+
dA.test_dA(training_epochs = 3)
29+
print >> sys.stderr, "test_dA took %.3fs expected Xs in our buildbot"%(time.time()-t0)
1730
def test_SdA():
31+
t0=time.time()
1832
SdA.test_SdA(pretraining_epochs = 2, training_epochs = 3)
33+
print >> sys.stderr, "test_SdA took %.3fs expected 971s in our buildbot"%(time.time()-t0)

0 commit comments

Comments
 (0)