Fix PerceiverModelIntegrationTest::test_inference_masked_lm (#26760)

fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2023-10-12 17:43:06 +02:00 committed by GitHub
parent 33df09e71a
commit a243cdca2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -888,7 +888,7 @@ class PerceiverModelIntegrationTest(unittest.TestCase):
logits = outputs.logits
# verify logits
expected_shape = torch.Size((1, tokenizer.model_max_length, tokenizer.vocab_size))
expected_shape = torch.Size((1, tokenizer.model_max_length, len(tokenizer)))
self.assertEqual(logits.shape, expected_shape)
expected_slice = torch.tensor(