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

fix the test to work with floatX=float32

上级 1efa650e
......@@ -2282,7 +2282,7 @@ class T_Scan(unittest.TestCase):
return x_t+1, theano.scan_module.until( x_t > 3)
o, _ = theano.scan(lambda_fn, x)
f = theano.function([x], o)
vx = numpy.zeros((50,))
vx = numpy.zeros((50,), dtype = theano.config.floatX)
vx[23] = 4
out = f(vx)
assert numpy.sum(out[24:]) == 0
......@@ -2296,7 +2296,7 @@ class T_Scan(unittest.TestCase):
x)
f = theano.function([x], [o,o2])
vx = numpy.zeros((50,))
vx = numpy.zeros((50,), dtype = theano.config.floatX)
vx[23] = 4
out, out2 = f(vx)
assert numpy.sum(out[24:]) == 0
......@@ -2315,7 +2315,7 @@ class T_Scan(unittest.TestCase):
x)
f = theano.function([x], [o,o2])
vx = numpy.zeros((50,))
vx = numpy.zeros((50,), dtype = theano.config.floatX)
vx[23] = 4
out, out2 = f(vx)
assert numpy.sum(out[24:]) == 0
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论