changeset 905:70b061f142b2

fix some import error.
author Frederic Bastien <nouiz@nouiz.org>
date Thu, 18 Mar 2010 10:45:29 -0400
parents 08b37147dec1
children d1a757d17e19
files pylearn/algorithms/tests/test_daa.py
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/algorithms/tests/test_daa.py	Fri Mar 12 01:50:52 2010 -0500
+++ b/pylearn/algorithms/tests/test_daa.py	Thu Mar 18 10:45:29 2010 -0400
@@ -6,12 +6,14 @@
 import time
 
 import pylearn.algorithms.logistic_regression
-from theano.compile.mode import default_mode
-
-def test_train_daa(mode = default_mode):
+from theano import config
+from pylearn.algorithms.stacker import Stacker
+from pylearn.algorithms.daa import SigmoidXEDenoisingAA
+from pylearn.algorithms.regressor import BinRegressor
+def test_train_daa(mode = config.mode):
 
     ndaa = 3
-    daa = models.Stacker([(models.SigmoidXEDenoisingAA, 'hidden')] * ndaa + [(models.BinRegressor, 'output')],
+    daa = Stacker([(SigmoidXEDenoisingAA, 'hidden')] * ndaa + [(BinRegressor, 'output')],
                          regularize = False)
 
     model = daa.make([4, 20, 20, 20, 1],
@@ -39,7 +41,7 @@
 def test_train_daa2(mode = theano.Mode('c|py', 'fast_run')):
 
     ndaa = 3
-    daa = models.Stacker([(models.SigmoidXEDenoisingAA, 'hidden')] * ndaa + [(pylearn.algorithms.logistic_regression.Module_Nclass, 'pred')],
+    daa = Stacker([(SigmoidXEDenoisingAA, 'hidden')] * ndaa + [(pylearn.algorithms.logistic_regression.Module_Nclass, 'pred')],
                          regularize = False)
 
     model = daa.make([4] + [20] * ndaa + [10],