Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bn tol 1e-4 => 1e-3 #5811

Merged
merged 9 commits into from
Aug 9, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def _test_body(self, x, norm_axis, params_axis, dtype=np.float32):
print("without xla: ", a.numpy())
print("with xla", b.numpy())
self.assertTrue(
np.allclose(a.numpy(), b.numpy(), rtol=0.05, atol=0.05),
np.allclose(a.numpy(), b.numpy(), rtol=0.05, atol=0.1),
a.numpy() - b.numpy(),
)
flow.clear_default_session()
Expand Down
2 changes: 1 addition & 1 deletion python/oneflow/test/modules/test_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def test_layernorm(test_case):
for arg in GenArgList(arg_dict):
arg[0](test_case, *arg[1:])

@autotest(n=5, auto_backward=False, rtol=1e-4, atol=1e-4)
@autotest(n=5, auto_backward=False, rtol=1e-3, atol=1e-3)
def test_layernorm_with_random_data(test_case):
channel = random(1, 6).to(int)
height = random(1, 6).to(int)
Expand Down