Added with torch.no_grad() to Camembert integration test (#21544)
add with torch.no_grad() to Camembert integration test Co-authored-by: Bibi <Bibi@katies-mac.local>
This commit is contained in:
@@ -39,6 +39,7 @@ class CamembertModelIntegrationTest(unittest.TestCase):
|
||||
device=torch_device,
|
||||
dtype=torch.long,
|
||||
) # J'aime le camembert !
|
||||
with torch.no_grad():
|
||||
output = model(input_ids)["last_hidden_state"]
|
||||
expected_shape = torch.Size((1, 10, 768))
|
||||
self.assertEqual(output.shape, expected_shape)
|
||||
|
||||
Reference in New Issue
Block a user