Unverified Commit 2b483230 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Raise diff tolerance value for TFViTMAEModelTest (#16483)



* Raise diff tolerance value
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent ee18d4d2
......@@ -427,7 +427,9 @@ class TFViTMAEModelTest(TFModelTesterMixin, unittest.TestCase):
tf_outputs[pt_nans] = 0
max_diff = np.amax(np.abs(tf_outputs - pt_outputs))
self.assertLessEqual(max_diff, 1e-5)
# Set a higher tolerance (2e-5) here than the one in the common test (1e-5).
# TODO: A deeper look to decide the best (common) tolerance for the test to be strict but not too flaky.
self.assertLessEqual(max_diff, 2e-5)
else:
raise ValueError(
f"`tf_outputs` should be a `tuple` or an instance of `tf.Tensor`. Got {type(tf_outputs)} instead."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment