提交 724a2569 authored 作者: nouiz's avatar nouiz

Merge pull request #326 from pascanur/test_scan_savemem_opt_fix

test for the recent fix for one optimization of scan
...@@ -2676,6 +2676,13 @@ class T_Scan(unittest.TestCase): ...@@ -2676,6 +2676,13 @@ class T_Scan(unittest.TestCase):
dtype=theano.config.floatX) dtype=theano.config.floatX)
assert numpy.allclose(f(vx, vA), vR) assert numpy.allclose(f(vx, vA), vR)
def test_savemem_opt(self):
y0 = theano.shared(numpy.ones((2, 10)))
[y1, y2], updates = theano.scan(lambda y: [y, y],
outputs_info=[dict(initial=y0,
taps=[-2]), None],
n_steps=5)
rval = theano.function([], y2.sum())()
def test_grad_multiple_taps_state(self): def test_grad_multiple_taps_state(self):
# The test is based on the code provided by Timothy Lillicrap # The test is based on the code provided by Timothy Lillicrap
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论