"...composable_kernel_onnx.git" did not exist on "b491ebf38480bc0d6cb329ba6825dee610c59097"
Unverified Commit 21a2d900 authored by Katie Le's avatar Katie Le Committed by GitHub
Browse files

Added with torch.no_grad() to Camembert integration test (#21544)



add with torch.no_grad() to Camembert integration test
Co-authored-by: default avatarBibi <Bibi@katies-mac.local>
parent f8394268
...@@ -39,7 +39,8 @@ class CamembertModelIntegrationTest(unittest.TestCase): ...@@ -39,7 +39,8 @@ class CamembertModelIntegrationTest(unittest.TestCase):
device=torch_device, device=torch_device,
dtype=torch.long, dtype=torch.long,
) # J'aime le camembert ! ) # 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)) expected_shape = torch.Size((1, 10, 768))
self.assertEqual(output.shape, expected_shape) self.assertEqual(output.shape, expected_shape)
# compare the actual values for a slice. # compare the actual values for a slice.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment