提交 5b44b006 authored 作者: Razvan Pascanu's avatar Razvan Pascanu

assert that Jx is a list

上级 a8b2e34b
......@@ -117,6 +117,7 @@ def test003_jacobian_scalar():
# test when the jacobian is called with a list as wrt
Jx = tensor.jacobian(y, [x])
assert isinstance(Jx,list)
f = theano.function([x], Jx[0])
vx = numpy.cast[theano.config.floatX](rng.uniform())
assert numpy.allclose(f(vx), 2)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论