# HG changeset patch # User Frederic Bastien # Date 1268923529 14400 # Node ID 70b061f142b2c8d7d9ab652634640657c1ff1e36 # Parent 08b37147dec125e3068252bd17ef7cf1b7651c03 fix some import error. diff -r 08b37147dec1 -r 70b061f142b2 pylearn/algorithms/tests/test_daa.py --- 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],