提交 ca732b67 authored 作者: Frederic's avatar Frederic

fix test with floatX=float32

上级 52a98808
......@@ -12,5 +12,5 @@ def test_assert_op_gradient():
grad = T.grad(cost, x)
func = theano.function([x], grad)
x_val = numpy.ones(shape=(1,))
x_val = numpy.ones(shape=(1,), dtype=theano.config.floatX)
assert func(x_val) == 1
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论