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
f5516805
"docs/source/vscode:/vscode.git/clone" did not exist on "d6eeb871706db0d64ab9ffd79f9545d95286b536"
Commit
f5516805
authored
Feb 26, 2020
by
Julien Chaumond
Browse files
Fix bart slow test
parent
5bc99e7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_modeling_bart.py
tests/test_modeling_bart.py
+1
-1
No files found.
tests/test_modeling_bart.py
View file @
f5516805
...
...
@@ -314,7 +314,7 @@ class BartModelIntegrationTest(unittest.TestCase):
output
=
model
.
forward
(
**
inputs_dict
)[
0
]
expected_shape
=
torch
.
Size
((
1
,
11
,
1024
))
self
.
assertEqual
(
output
.
shape
,
expected_shape
)
expected_slice
=
torch
.
T
ensor
(
expected_slice
=
torch
.
t
ensor
(
[[
0.7144
,
0.8143
,
-
1.2813
],
[
0.7144
,
0.8143
,
-
1.2813
],
[
-
0.0467
,
2.5911
,
-
2.1845
]],
device
=
torch_device
)
self
.
assertTrue
(
torch
.
allclose
(
output
[:,
:
3
,
:
3
],
expected_slice
,
atol
=
TOLERANCE
))
...
...
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