Unverified Commit c6a928ca authored by Partho's avatar Partho Committed by GitHub
Browse files

wrap forward passes with torch.no_grad() (#19414)

parent d739a707
...@@ -538,6 +538,7 @@ class ImageGPTModelIntegrationTest(unittest.TestCase): ...@@ -538,6 +538,7 @@ class ImageGPTModelIntegrationTest(unittest.TestCase):
inputs = feature_extractor(images=image, return_tensors="pt").to(torch_device) inputs = feature_extractor(images=image, return_tensors="pt").to(torch_device)
# forward pass # forward pass
with torch.no_grad():
outputs = model(**inputs) outputs = model(**inputs)
# verify the logits # verify the logits
......
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