提交 bb6261c4 authored 作者: Razvan Pascanu's avatar Razvan Pascanu 提交者: David Warde-Farley

Use the _allclose function to decide if arrays are close.

Conflicts: theano/sandbox/linalg/tests/test_linalg.py
上级 1d8ef85d
......@@ -108,7 +108,7 @@ def test_rop_lop():
v1 = rop_f(vx,vv)
v2 = scan_f(vx,vv)
assert numpy.allclose(v1,v2), ('ROP mismatch: %s %s' % (v1, v2))
assert _allclose(v1, v2), ('ROP mismatch: %s %s' % (v1, v2))
raised = False
try:
......@@ -128,10 +128,9 @@ def test_rop_lop():
sy = tensor.grad((v*y).sum(), mx)
scan_f = function([mx, v], sy)
v1 = lop_f(vx,vv)
v2 = scan_f(vx,vv)
assert numpy.allclose(v1,v2), ('LOP mismatch: %s %s' % (v1, v2))
v1 = lop_f(vx, vv)
v2 = scan_f(vx, vv)
assert _allclose(v1, v2), ('LOP mismatch: %s %s' % (v1, v2))
def test_det_grad():
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论