mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-03 03:31:05 +06:00
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:
parent
f83942684d
commit
21a2d900ec
@ -39,7 +39,8 @@ class CamembertModelIntegrationTest(unittest.TestCase):
|
||||
device=torch_device,
|
||||
dtype=torch.long,
|
||||
) # J'aime le camembert !
|
||||
output = model(input_ids)["last_hidden_state"]
|
||||
with torch.no_grad():
|
||||
output = model(input_ids)["last_hidden_state"]
|
||||
expected_shape = torch.Size((1, 10, 768))
|
||||
self.assertEqual(output.shape, expected_shape)
|
||||
# compare the actual values for a slice.
|
||||
|
Loading…
Reference in New Issue
Block a user