提交 d7766b1a authored 作者: Razvan Pascanu's avatar Razvan Pascanu

test for the small fix to sandbox scan

上级 9fbf2f61
......@@ -62,10 +62,22 @@ def test_004():
val_sq = numpy.float32([1,2,3,4,5])
assert numpy.all(fn(val_sq, 5) == val_sq +1)
def test_005():
sq = theano.tensor.fvector('sq')
nst = theano.tensor.iscalar('nst')
out, _ = scan.scan(lambda s: s+numpy.float32(1),
sequences=sq,
states = [None],
n_steps = nst)
fn = theano.function([sq, nst], out)
val_sq = numpy.float32([1,2,3,4,5])
assert numpy.all(fn(val_sq, 5) == val_sq +1)
if __name__=='__main__':
test_001()
test_002()
test_003()
test_004()
test_005()
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论