changeset 560:96221aa02fcb

put the new test in a different test fct.
author Frederic Bastien <bastienf@iro.umontreal.ca>
date Mon, 01 Dec 2008 16:16:21 -0500
parents 83ebb313b2f1
children ecbad22bd2f5 16f91ca016b1 5d1228f99caa
files pylearn/algorithms/rnn.py
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pylearn/algorithms/rnn.py	Mon Dec 01 16:15:10 2008 -0500
+++ b/pylearn/algorithms/rnn.py	Mon Dec 01 16:16:21 2008 -0500
@@ -202,7 +202,18 @@
         else:
             rnn.minimizer.step_cost(x, y)
 
-    
+def test_WEIRD_STUFF():
+    n_vis = 5
+    n_out = 3
+    n_hid = 4
+    rng = N.random.RandomState(7722342)
+    x = rng.randn(10,n_vis)
+    y = rng.randn(10,n_out)
+
+    #set y to be like x with a lag of LAG
+    LAG = 4
+    y[LAG:] = x[:-LAG, 0:n_out]
+
     minimizer_fn = make_minimizer('sgd', stepsize = 0.001, WEIRD_STUFF = False)
     rnn_module = ExampleRNN(n_vis, n_hid, n_out, minimizer_fn)