Mercurial > pylearn
comparison pylearn/algorithms/tests/test_mcRBM.py @ 1525:9c24a2bdbe90
a test is too slow when run in debugmode, so we force fast_run in that case.
author | Frederic Bastien <nouiz@nouiz.org> |
---|---|
date | Fri, 09 Nov 2012 14:48:26 -0500 |
parents | 9d21919e2332 |
children |
comparison
equal
deleted
inserted
replaced
1524:9d21919e2332 | 1525:9c24a2bdbe90 |
---|---|
22 l1_penalty=l1_penalty, | 22 l1_penalty=l1_penalty, |
23 l1_penalty_start=l1_penalty_start, | 23 l1_penalty_start=l1_penalty_start, |
24 persistent_chains=persistent_chains) | 24 persistent_chains=persistent_chains) |
25 | 25 |
26 | 26 |
27 def test_reproduce_ranzato_hinton_2010( | 27 def test_reproduce_ranzato_hinton_2010(): |
28 # We need to modify the global mode as otherwise there is a | |
29 # function being compiler in the sample that won't use the mode we | |
30 # want. | |
31 try: | |
32 orig_mode = theano.config.mode | |
33 if theano.config.mode in ["DebugMode", "DEBUG_MODE"]: | |
34 theano.config.mode = "FAST_RUN" | |
35 reproduce_ranzato_hinton_2010() | |
36 finally: | |
37 theano.config.mode = orig_mode | |
38 | |
39 | |
40 def reproduce_ranzato_hinton_2010( | |
28 dataset='MAR', as_unittest=True, n_train_iters=5000, | 41 dataset='MAR', as_unittest=True, n_train_iters=5000, |
29 rbm_alloc=_default_rbm_alloc, trainer_alloc=_default_trainer_alloc, | 42 rbm_alloc=_default_rbm_alloc, trainer_alloc=_default_trainer_alloc, |
30 lr_per_example=.075, | 43 lr_per_example=.075, |
31 l1_penalty=1e-3, | 44 l1_penalty=1e-3, |
32 l1_penalty_start=1000, | 45 l1_penalty_start=1000, |