未验证 提交 4e2a3c11 编写于 作者: N Nyakku Shigure 提交者: GitHub

[CodeStyle] use np.testing.assert_allclose instead of...

[CodeStyle] use np.testing.assert_allclose instead of self.assertTrue(np.allclose(...)) (part 3) (#45251)
上级 e654f1e7
......@@ -1147,7 +1147,7 @@ class TestDropOutWithProbTensor(unittest.TestCase):
for x in self.inputs:
static_res = self.run_static(x)
dygraph_res = self.run_dygraph(x)
self.assertTrue(np.array_equal(static_res, dygraph_res))
np.testing.assert_array_equal(static_res, dygraph_res)
class TestRandomValue(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册