提交 d49a5c1b 编写于 作者: M Megvii Engine Team

fix(mge/imperative): remove codes newly introduced in numpy 1.19

GitOrigin-RevId: 874350cbc78d449eca4179ffcd49807afeafc3f6
上级 69a7c55f
...@@ -155,9 +155,7 @@ class trace: ...@@ -155,9 +155,7 @@ class trace:
"last time, got an internal tensor this time" "last time, got an internal tensor this time"
) )
if x._handle != info.bound_data._handle: if x._handle != info.bound_data._handle:
if not np.array_equal( if not np.array_equal(x.numpy(), info.bound_data.numpy()):
x.numpy(), info.bound_data.numpy(), equal_nan=True
):
raise TraceMismatchError( raise TraceMismatchError(
"const capture violated: got " "const capture violated: got "
"a different tensor this time" "a different tensor this time"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册