Added forward pass of test_inference_image_classification_head with torch.no_grad() (#14777)
This commit is contained in:
@@ -347,6 +347,7 @@ class ViTModelIntegrationTest(unittest.TestCase):
|
||||
inputs = feature_extractor(images=image, return_tensors="pt").to(torch_device)
|
||||
|
||||
# forward pass
|
||||
with torch.no_grad():
|
||||
outputs = model(**inputs)
|
||||
|
||||
# verify the logits
|
||||
|
||||
Reference in New Issue
Block a user