提交 d0e258dc authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix test in float32

上级 2b0880dd
......@@ -4257,7 +4257,7 @@ class T_Scan(unittest.TestCase):
f = theano.function(inputs=[A, k],
outputs=final_result,
updates=updates)
f([2, 3, .1, 0, 1], 4)
f(numpy.asarray([2, 3, .1, 0, 1], dtype=theano.config.floatX), 4)
# There should be 3 outputs greater than 10: prior_result[0] at step 3,
# and prior_result[1] at steps 2 and 3.
......
......@@ -254,7 +254,7 @@ def test_debugprint():
def test_scan_debugprint1():
k = tensor.iscalar("k")
A = tensor.vector("A")
A = tensor.dvector("A")
# Symbolic description of the result
result, updates = theano.scan(fn=lambda prior_result, A: prior_result * A,
......@@ -375,11 +375,11 @@ def test_scan_debugprint2():
def test_scan_debugprint3():
coefficients = theano.tensor.vector("coefficients")
coefficients = theano.tensor.dvector("coefficients")
max_coefficients_supported = 10
k = tensor.iscalar("k")
A = tensor.vector("A")
A = tensor.dvector("A")
# compute A**k
def compute_A_k(A, k):
......@@ -569,7 +569,7 @@ def test_scan_debugprint4():
def test_scan_debugprint5():
k = tensor.iscalar("k")
A = tensor.vector("A")
A = tensor.dvector("A")
# Symbolic description of the result
result, updates = theano.scan(fn=lambda prior_result, A: prior_result * A,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论