[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.
my_2.0rc
Huihuang Zheng 4 years ago committed by GitHub
parent 6ad72106f9
commit b7107c65a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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))

Loading…
Cancel
Save