# HG changeset patch # User Frederic Bastien # Date 1270063089 14400 # Node ID 995b50f0c2ee248e315d7c2212e78ba495d49b35 # Parent 6be337c30928df9bc6665e68f10fe6d3c4c54bc9 make test faster in debug mode diff -r 6be337c30928 -r 995b50f0c2ee pylearn/shared/layers/tests/test_lecun1998.py --- a/pylearn/shared/layers/tests/test_lecun1998.py Wed Mar 31 15:17:40 2010 -0400 +++ b/pylearn/shared/layers/tests/test_lecun1998.py Wed Mar 31 15:18:09 2010 -0400 @@ -1,8 +1,12 @@ from pylearn.shared.layers.lecun1998 import * from pylearn.shared.layers import LogisticRegression +from theano.compile.debugmode import DebugMode import theano.sandbox.softsign def test_w_random(bsize=10, n_iter=100, dtype='float64'): + if isinstance(theano.compile.mode.get_default_mode(),DebugMode): + n_iter=2 + ishape=(28,28) fshape=(5,5) if dtype == 'float64': @@ -30,7 +34,8 @@ print i, 'rval', fN assert f0 > 6 - assert fN < .3 + if not isinstance(theano.compile.mode.get_default_mode(),DebugMode): + assert fN < .3 def test_squash():