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
67a8be8e
Commit
67a8be8e
authored
Dec 10, 2019
by
thomwolf
Browse files
fix backward in tests
parent
f2538c12
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
transformers/tests/modeling_common_test.py
transformers/tests/modeling_common_test.py
+1
-2
No files found.
transformers/tests/modeling_common_test.py
View file @
67a8be8e
...
@@ -277,8 +277,7 @@ class CommonTestCases:
...
@@ -277,8 +277,7 @@ class CommonTestCases:
inputs
=
inputs_dict
.
copy
()
inputs
=
inputs_dict
.
copy
()
inputs
[
'head_mask'
]
=
head_mask
inputs
[
'head_mask'
]
=
head_mask
with
torch
.
no_grad
():
outputs
=
model
(
**
inputs
)
outputs
=
model
(
**
inputs
)
# Test that we can get a gradient back for importance score computation
# Test that we can get a gradient back for importance score computation
output
=
sum
(
t
.
sum
()
for
t
in
outputs
[
0
])
output
=
sum
(
t
.
sum
()
for
t
in
outputs
[
0
])
...
...
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