mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 02:02:21 +06:00
Raise diff tolerance value for TFViTMAEModelTest (#16483)
* Raise diff tolerance value Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
ee18d4d2a9
commit
2b483230a1
@ -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."
|
||||
|
Loading…
Reference in New Issue
Block a user