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
e56e3140
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "986526a0e4f5ab803581074e9e4069c3edcff1dc"
Unverified
Commit
e56e3140
authored
Jun 08, 2021
by
NielsRogge
Committed by
GitHub
Jun 08, 2021
Browse files
Fix integration tests (#12066)
parent
4abc6dd6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
tests/test_modeling_luke.py
tests/test_modeling_luke.py
+2
-2
No files found.
tests/test_modeling_luke.py
View file @
e56e3140
...
...
@@ -573,7 +573,7 @@ class LukeModelIntegrationTests(unittest.TestCase):
expected_shape
=
torch
.
Size
((
1
,
1
,
768
))
self
.
assertEqual
(
outputs
.
entity_last_hidden_state
.
shape
,
expected_shape
)
expected_slice
=
torch
.
tensor
([[
0.1457
,
0.1044
,
0.0174
]])
expected_slice
=
torch
.
tensor
([[
0.1457
,
0.1044
,
0.0174
]])
.
to
(
torch_device
)
self
.
assertTrue
(
torch
.
allclose
(
outputs
.
entity_last_hidden_state
[
0
,
:
3
,
:
3
],
expected_slice
,
atol
=
1e-4
))
@
slow
...
...
@@ -605,5 +605,5 @@ class LukeModelIntegrationTests(unittest.TestCase):
expected_shape
=
torch
.
Size
((
1
,
1
,
1024
))
self
.
assertEqual
(
outputs
.
entity_last_hidden_state
.
shape
,
expected_shape
)
expected_slice
=
torch
.
tensor
([[
0.0466
,
-
0.0106
,
-
0.0179
]])
expected_slice
=
torch
.
tensor
([[
0.0466
,
-
0.0106
,
-
0.0179
]])
.
to
(
torch_device
)
self
.
assertTrue
(
torch
.
allclose
(
outputs
.
entity_last_hidden_state
[
0
,
:
3
,
:
3
],
expected_slice
,
atol
=
1e-4
))
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