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 23
23
- PART="test.py:test_logistic_sgd test.py:test_logistic_cg test.py:test_mlp test.py:test_convolutional_mlp test.py:test_dA"
24
24
- PART="test.py:test_SdA test.py:test_lstm"
25
25
- 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 "
27
27
- PART="-e test.py"
28
28
29
29
# i7-2600K CPU @ 3.40GHz
Original file line number Diff line number Diff line change @@ -126,11 +126,14 @@ def get_perf(filename, folder):
126
126
stdout = subprocess .PIPE )
127
127
128
128
stdout , _ = proc .communicate ('' .join (open (filename ).readlines ()))
129
+ out = None
129
130
for line in stdout .split ('\n ' ):
130
131
if 'accuracy' in line :
131
132
out = line .split ()
132
133
break
133
-
134
+ # To help debug
135
+ if out is None :
136
+ print stdout .split ('\n ' )
134
137
precision = float (out [6 ][:- 2 ])
135
138
recall = float (out [8 ][:- 2 ])
136
139
f1score = float (out [10 ])
Original file line number Diff line number Diff line change 15
15
import lstm
16
16
17
17
18
- def test_rnnslu ():
19
- rnnslu .main ()
20
-
21
-
22
18
def test_logistic_sgd ():
23
19
logistic_sgd .sgd_optimization_mnist (n_epochs = 10 )
24
20
@@ -62,6 +58,26 @@ def test_rnnrbm():
62
58
rnnrbm .test_rnnrbm (num_epochs = 1 )
63
59
64
60
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
+
65
81
def test_lstm ():
66
82
lstm .train_lstm (max_epochs = 1 , test_size = 1000 , saveto = '' )
67
83
You can’t perform that action at this time.
0 commit comments