提交 d91bf368 authored 作者: nouiz's avatar nouiz

Merge pull request #359 from pascanur/buildbod_fails_scan

fix for fails in the buildbot
...@@ -330,7 +330,7 @@ class ScanOp(PureOp): ...@@ -330,7 +330,7 @@ class ScanOp(PureOp):
for buf, rval in izip(non_numeric_states_bufs, rvals): for buf, rval in izip(non_numeric_states_bufs, rvals):
buf[0] = rval buf[0] = rval
for pos in xrange(n_numeric_values): for pos in xrange(n_numeric_values):
buf = state_buffers[pos][2][0] buf = state_buffers[pos][0].get_value(borrow=True)
mintap = self.mintaps[pos] mintap = self.mintaps[pos]
node_output_storage[pos][0] = buf node_output_storage[pos][0] = buf
for out_buf, in_buf in izip( for out_buf, in_buf in izip(
......
...@@ -2705,7 +2705,7 @@ class T_Scan(unittest.TestCase): ...@@ -2705,7 +2705,7 @@ class T_Scan(unittest.TestCase):
grad_fn = theano.function([xinit, w], [gx,gw], grad_fn = theano.function([xinit, w], [gx,gw],
allow_input_downcast = True) allow_input_downcast = True)
rng = numpy.random.RandomState(utt.fetch_seed()) rng = numpy.random.RandomState(utt.fetch_seed())
v_x = numpy.array(rng.uniform(size=(5,2,3), low=-.5, high=.5), v_x = numpy.array(rng.uniform(size=(5,2,3), low=-2., high=2.),
dtype=theano.config.floatX) dtype=theano.config.floatX)
v_w = numpy.array(rng.uniform(size=(2,2)), dtype= theano.config.floatX) v_w = numpy.array(rng.uniform(size=(2,2)), dtype= theano.config.floatX)
analytic_grad = grad_fn(v_x, v_w) analytic_grad = grad_fn(v_x, v_w)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论