diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_yolov3.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_yolov3.py index 6aa9156a0d4cb8e737f395d04521257ccb95559e..851c76f8427e0de5ca6b228aed8b1e5335064ec8 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_yolov3.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_yolov3.py @@ -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))