Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
0167edc8
Unverified
Commit
0167edc8
authored
Jan 17, 2022
by
MrinalTyagi
Committed by
GitHub
Jan 17, 2022
Browse files
Added forward pass of test_inference_image_classification_head with torch.no_grad() (#14777)
parent
7a787c68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
tests/test_modeling_vit.py
tests/test_modeling_vit.py
+2
-1
No files found.
tests/test_modeling_vit.py
View file @
0167edc8
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment