Skip to content

Commit

Permalink
rtol -> atol
Browse files Browse the repository at this point in the history
  • Loading branch information
sijunhe committed Feb 1, 2023
1 parent 1033445 commit a636444
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/transformers/bert/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def test_bert_classes_from_local_dir(self, class_name, pytorch_class_name: str |
np.allclose(
paddle_logit.detach().cpu().reshape([-1])[:9].numpy(),
torch_logit.detach().cpu().reshape([-1])[:9].numpy(),
rtol=1e-4,
atol=1e-3,
)
)

Expand Down
2 changes: 1 addition & 1 deletion tests/transformers/gpt/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ def test_gpt_classes_from_local_dir(self, paddle_class_name, pytorch_class_name:
np.allclose(
paddle_logit.detach().cpu().numpy().reshape([-1])[:9],
torch_logit.detach().cpu().numpy().reshape([-1])[:9],
rtol=1e-3,
atol=1e-3,
)
)

Expand Down
2 changes: 1 addition & 1 deletion tests/transformers/roberta/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def test_roberta_classes_from_local_dir(self, class_name):
np.allclose(
paddle_logit.detach().cpu().reshape([-1])[:9].numpy(),
torch_logit.detach().cpu().reshape([-1])[:9].numpy(),
rtol=1e-4,
atol=1e-3,
)
)

Expand Down
2 changes: 1 addition & 1 deletion tests/transformers/t5/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ def test_t5_for_conditional_generation(self):
np.allclose(
paddle_logit.detach().cpu().reshape([-1])[:9].numpy(),
torch_logit.detach().cpu().reshape([-1])[:9].numpy(),
rtol=1e-4,
atol=1e-3,
)
)

Expand Down

0 comments on commit a636444

Please sign in to comment.