未验证 提交 b7107c65 编写于 作者: H Huihuang Zheng 提交者: GitHub

[Dy2stat] Fix test_yolov3 to Run Correctly on Win/Mac (#27666)

We decreased the batch size on CPU so that it can run correctly on Win/Mac machine, this may cause the delta to be larger. So I set larger delta value.
上级 6ad72106
......@@ -163,7 +163,8 @@ class TestYolov3(unittest.TestCase):
dygraph_loss = train(to_static=False)
static_loss = train(to_static=True)
self.assertTrue(
np.allclose(dygraph_loss, static_loss),
np.allclose(
dygraph_loss, static_loss, atol=1e-5, rtol=1e-3),
msg="dygraph_loss: {} \nstatic_loss: {}".format(dygraph_loss,
static_loss))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册