Update ConvNextV2ModelIntegrationTest::test_inference_image_classification_head (#23402)

fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar 2023-05-16 23:35:11 +02:00 committed by GitHub
parent ca3df9f0cf
commit 46d2468695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -353,5 +353,5 @@ class ConvNextV2ModelIntegrationTest(unittest.TestCase):
expected_shape = torch.Size((1, 1000))
self.assertEqual(outputs.logits.shape, expected_shape)
expected_slice = torch.tensor([-0.3083, -0.3040, -0.4344]).to(torch_device)
expected_slice = torch.tensor([0.9996, 0.1966, -0.4386]).to(torch_device)
self.assertTrue(torch.allclose(outputs.logits[0, :3], expected_slice, atol=1e-4))