diff --git a/test/legacy_test/test_sync_batch_norm_op.py b/test/legacy_test/test_sync_batch_norm_op.py index 9013ad3a34025..bbcbac41b9e8b 100644 --- a/test/legacy_test/test_sync_batch_norm_op.py +++ b/test/legacy_test/test_sync_batch_norm_op.py @@ -110,7 +110,7 @@ def setUp(self): self.H = 32 self.W = 32 self.dshape = [self.N, self.C, self.H, self.W] - self.atol = 1e-3 + self.atol = 5e-3 self.data_dir = tempfile.TemporaryDirectory() self.fleet_log_dir = tempfile.TemporaryDirectory() @@ -296,7 +296,7 @@ def _compare_impl(self, place, layout, only_forward): np.testing.assert_allclose( convert_numpy_array(bn_val), convert_numpy_array(sync_bn_val), - rtol=1e-05, + rtol=1e-04, atol=self.atol, err_msg='Output (' + fetch_names[i] @@ -340,7 +340,7 @@ def setUp(self): self.H = 32 self.W = 32 self.dshape = [self.N, self.C, self.H, self.W] - self.atol = 1e-3 + self.atol = 5e-3 self.data_dir = tempfile.TemporaryDirectory() self.fleet_log_dir = tempfile.TemporaryDirectory()