changeset 923:06cc2b0c06ea

make the code run faster in debug mode.
author Frederic Bastien <nouiz@nouiz.org>
date Tue, 30 Mar 2010 12:09:11 -0400
parents 568066b9c5a3
children be420f1836bb
files pylearn/algorithms/tests/test_exponential_mean.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/algorithms/tests/test_exponential_mean.py	Fri Mar 26 14:57:35 2010 -0400
+++ b/pylearn/algorithms/tests/test_exponential_mean.py	Tue Mar 30 12:09:11 2010 -0400
@@ -50,6 +50,9 @@
     assert i > rows_to_test
 
 def test_dynamic_normalizer():
+    m = theano.compile.mode.get_defautl_mode()
+    if isinstance(m,DebugMode):
+        m='FAST_RUN'
     x = theano.tensor.dvector()
 
     rows_to_test = 100
@@ -76,7 +79,7 @@
 
     M.f = theano.Method([x], [D.output, M.dn_mean.curval, M.dn_var.curval, M.x_mean.curval] , updates)
 
-    m = M.make()
+    m = M.make(mode=m)
     m.dn.initialize()
     m.dn_mean.initialize()
     m.dn_var.initialize()