提交 976d2fb9 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

fix to PEP8 commit (a few commas that I missed)

上级 1334860c
...@@ -846,7 +846,7 @@ class T_Scan(unittest.TestCase): ...@@ -846,7 +846,7 @@ class T_Scan(unittest.TestCase):
truncate_gradient=-1, truncate_gradient=-1,
go_backwards=False, go_backwards=False,
mode=mode) mode=mode)
f9 = theano.function([mu0, mu1, mu2, x0, x1] f9 = theano.function([mu0, mu1, mu2, x0, x1],
outputs, outputs,
updates=updates, updates=updates,
mode=mode, mode=mode,
...@@ -1098,11 +1098,11 @@ class T_Scan(unittest.TestCase): ...@@ -1098,11 +1098,11 @@ class T_Scan(unittest.TestCase):
vsample, vsample,
[], [],
n_steps=10, n_steps=10,
truncate_gradient=-1 truncate_gradient=-1,
go_backwards=False) go_backwards=False)
my_f = theano.function([vsample], theano_vsamples[-1], my_f = theano.function([vsample], theano_vsamples[-1],
updates=updates updates=updates,
allow_input_downcast=True) allow_input_downcast=True)
_rng = numpy.random.RandomState(utt.fetch_seed()) _rng = numpy.random.RandomState(utt.fetch_seed())
...@@ -1145,8 +1145,8 @@ class T_Scan(unittest.TestCase): ...@@ -1145,8 +1145,8 @@ class T_Scan(unittest.TestCase):
[], [],
[], [],
[], [],
n_steps=n_steps n_steps=n_steps,
truncate_gradient=-1 truncate_gradient=-1,
go_backwards=False) go_backwards=False)
this_f = theano.function([n_steps], this_f = theano.function([n_steps],
output, output,
...@@ -1889,14 +1889,17 @@ class T_Scan(unittest.TestCase): ...@@ -1889,14 +1889,17 @@ class T_Scan(unittest.TestCase):
y0 = theano.tensor.vector('y0') y0 = theano.tensor.vector('y0')
def f_rnn_cmpl(u1_t, u2_t, x_tm1, y_tm1, y_tm3, W_in1): def f_rnn_cmpl(u1_t, u2_t, x_tm1, y_tm1, y_tm3, W_in1):
return [y_tm3 + 1, y_tm3 + 2, return [y_tm3 + 1,
y_tm3 + 2,
theano.dot(u1_t, W_in1) + u2_t * W_in2 + \ theano.dot(u1_t, W_in1) + u2_t * W_in2 + \
theano.dot(x_tm1, W), theano.dot(x_tm1, W),
y_tm1 + theano.dot(x_tm1, W_out)] y_tm1 + theano.dot(x_tm1, W_out)]
outputs, updates = theano.scan(f_rnn_cmpl, outputs, updates = theano.scan(f_rnn_cmpl,
[u1, u2] [u1, u2],
[None, None, x0, [None,
None,
x0,
dict(initial=y0, taps=[-1, -3])], dict(initial=y0, taps=[-1, -3])],
W_in1, W_in1,
n_steps=None, n_steps=None,
...@@ -1981,7 +1984,7 @@ class T_Scan(unittest.TestCase): ...@@ -1981,7 +1984,7 @@ class T_Scan(unittest.TestCase):
theano.dot(x_tm1, W), theano.dot(x_tm1, W),
y_tm1 + theano.dot(x_tm1, W_out)] y_tm1 + theano.dot(x_tm1, W_out)]
_outputs, updates = theano.scan(f_rnn_cmpl _outputs, updates = theano.scan(f_rnn_cmpl,
[u1, u2], [u1, u2],
[None, [None,
dict(initial=x0), dict(initial=x0),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论