提交 170aff07 authored 作者: Pascal Lamblin's avatar Pascal Lamblin 提交者: GitHub

Merge pull request #5356 from nouiz/tests_float32

Fix tests when floatX=float32.
......@@ -990,14 +990,14 @@ class TestDnnInferShapes(utt.InferShapeTester):
img_val = numpy.asarray(
numpy.random.rand(*img_shape),
dtype=theano.config.floatX
dtype="float32"
)
topgrad_vals = numpy.asarray(
numpy.random.rand(*topgrad_shape),
dtype=theano.config.floatX
dtype="float32"
)
kerns_vals = numpy.zeros(kerns_shape, dtype=theano.config.floatX)
kerns_vals = numpy.zeros(kerns_shape, dtype="float32")
kerns_shape = theano.shared(numpy.asarray(kerns_shape))
topgrad_shape = theano.shared(numpy.asarray(topgrad_shape))
desc = dnn.GpuDnnConvDesc(
......@@ -1041,14 +1041,14 @@ class TestDnnInferShapes(utt.InferShapeTester):
img_val = numpy.asarray(
numpy.random.rand(*img_shape),
dtype=theano.config.floatX
dtype="float32"
)
topgrad_vals = numpy.asarray(
numpy.random.rand(*topgrad_shape),
dtype=theano.config.floatX
dtype="float32"
)
kerns_vals = numpy.zeros(kerns_shape, dtype=theano.config.floatX)
kerns_vals = numpy.zeros(kerns_shape, dtype="float32")
kerns_shape = theano.shared(numpy.asarray(kerns_shape))
topgrad_shape = theano.shared(numpy.asarray(topgrad_shape))
desc = dnn.GpuDnnConvDesc(
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论