Fix BigBirdModelTester (#16310)

* fix

* update the expected value in test_fast_integration

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2022-03-24 13:43:52 +01:00 committed by GitHub
parent f5e8c9bdea
commit 2a27c80063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,7 +70,7 @@ class BigBirdModelTester:
attention_type="block_sparse",
use_bias=True,
rescale_embeddings=False,
block_size=16,
block_size=8,
num_rand_blocks=3,
position_embedding_type="absolute",
scope=None,
@ -581,7 +581,7 @@ class BigBirdModelTest(ModelTesterMixin, unittest.TestCase):
self.assertTrue(
torch.allclose(
hidden_states[0, 0, :5],
torch.tensor([1.4943, 0.0928, 0.8254, -0.2816, -0.9788], device=torch_device),
torch.tensor([1.4825, 0.0774, 0.8226, -0.2962, -0.9593], device=torch_device),
atol=1e-3,
)
)