File tree Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 2323 - PART="test.py:test_logistic_sgd test.py:test_logistic_cg test.py:test_mlp test.py:test_convolutional_mlp test.py:test_dA"
2424 - PART="test.py:test_SdA test.py:test_lstm"
2525 - PART="test.py:test_dbn"
26- - PART="test.py:test_rbm test.py:test_rnnrbm"
26+ - PART="test.py:test_rbm test.py:test_rnnrbm test.py:test_rnnslu "
2727 - PART="-e test.py"
2828
2929# i7-2600K CPU @ 3.40GHz
Original file line number Diff line number Diff line change @@ -126,11 +126,14 @@ def get_perf(filename, folder):
126126 stdout = subprocess .PIPE )
127127
128128 stdout , _ = proc .communicate ('' .join (open (filename ).readlines ()))
129+ out = None
129130 for line in stdout .split ('\n ' ):
130131 if 'accuracy' in line :
131132 out = line .split ()
132133 break
133-
134+ # To help debug
135+ if out is None :
136+ print stdout .split ('\n ' )
134137 precision = float (out [6 ][:- 2 ])
135138 recall = float (out [8 ][:- 2 ])
136139 f1score = float (out [10 ])
Original file line number Diff line number Diff line change 1515import lstm
1616
1717
18- def test_rnnslu ():
19- rnnslu .main ()
20-
21-
2218def test_logistic_sgd ():
2319 logistic_sgd .sgd_optimization_mnist (n_epochs = 10 )
2420
@@ -62,6 +58,26 @@ def test_rnnrbm():
6258 rnnrbm .test_rnnrbm (num_epochs = 1 )
6359
6460
61+ def test_rnnslu ():
62+ s = {'fold' : 3 ,
63+ # 5 folds 0,1,2,3,4
64+ 'data' : 'atis' ,
65+ 'lr' : 0.0970806646812754 ,
66+ 'verbose' : 1 ,
67+ 'decay' : True ,
68+ # decay on the learning rate if improvement stops
69+ 'win' : 7 ,
70+ # number of words in the context window
71+ 'nhidden' : 200 ,
72+ # number of hidden units
73+ 'seed' : 345 ,
74+ 'emb_dimension' : 50 ,
75+ # dimension of word embedding
76+ 'nepochs' : 1 , # CHANGED
77+ 'savemodel' : False }
78+ rnnslu .main (s )
79+
80+
6581def test_lstm ():
6682 lstm .train_lstm (max_epochs = 1 , test_size = 1000 , saveto = '' )
6783
You can’t perform that action at this time.
0 commit comments