提交 9853b560 authored 作者: Pierre Luc Carrier's avatar Pierre Luc Carrier

Fix tests failing in float32

上级 96a2c0b6
......@@ -3307,9 +3307,10 @@ class T_Scan(unittest.TestCase):
g_output0 + g_output1)
# Run the function and validate the outputs
seq_value = numpy.random.random((10, 3))
out_init_value = numpy.random.random((3, 3))
non_seq_value = numpy.random.random((3))
dtype = theano.config.floatX
seq_value = numpy.random.random((10, 3)).astype(dtype)
out_init_value = numpy.random.random((3, 3)).astype(dtype)
non_seq_value = numpy.random.random((3)).astype(dtype)
outputs = fct(seq_value, out_init_value, non_seq_value)
......
......@@ -298,10 +298,12 @@ class test_RopLop(RopLop_checker):
ev_input, ev_filters])
scan_f = function([input, filters, ev_input, ev_filters], sy,
on_unused_input='ignore')
image_data = numpy.random.random(image_shape)
filter_data = numpy.random.random(filter_shape)
ev_image_data = numpy.random.random(image_shape)
ev_filter_data = numpy.random.random(filter_shape)
dtype = theano.config.floatX
image_data = numpy.random.random(image_shape).astype(dtype)
filter_data = numpy.random.random(filter_shape).astype(dtype)
ev_image_data = numpy.random.random(image_shape).astype(dtype)
ev_filter_data = numpy.random.random(filter_shape).astype(dtype)
v1 = rop_f(image_data, filter_data, ev_image_data,
ev_filter_data)
v2 = scan_f(image_data, filter_data, ev_image_data,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论