Unverified Commit b37cf7de authored by Henrik Holm's avatar Henrik Holm Committed by GitHub
Browse files

Add 'with torch.no_grad()' to integration test forward pass (#14821)

parent 952a77b0
......@@ -275,6 +275,7 @@ class DebertaModelIntegrationTest(unittest.TestCase):
input_ids = torch.tensor([[0, 31414, 232, 328, 740, 1140, 12695, 69, 46078, 1588, 2]])
attention_mask = torch.tensor([[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]])
with torch.no_grad():
output = model(input_ids, attention_mask=attention_mask)[0]
# compare the actual values for a slice.
expected_slice = torch.tensor(
......
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