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
ec43d687
Unverified
Commit
ec43d687
authored
Dec 13, 2023
by
Arthur
Committed by
GitHub
Dec 13, 2023
Browse files
[`CI slow`] Fix expected values (#27999)
* fix expected values * style * test is slow
parent
749f94e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/models/vit_msn/test_modeling_vit_msn.py
tests/models/vit_msn/test_modeling_vit_msn.py
+1
-1
No files found.
tests/models/vit_msn/test_modeling_vit_msn.py
View file @
ec43d687
...
@@ -227,6 +227,6 @@ class ViTMSNModelIntegrationTest(unittest.TestCase):
...
@@ -227,6 +227,6 @@ class ViTMSNModelIntegrationTest(unittest.TestCase):
expected_shape
=
torch
.
Size
((
1
,
1000
))
expected_shape
=
torch
.
Size
((
1
,
1000
))
self
.
assertEqual
(
outputs
.
logits
.
shape
,
expected_shape
)
self
.
assertEqual
(
outputs
.
logits
.
shape
,
expected_shape
)
expected_slice
=
torch
.
tensor
([
-
0.
0803
,
-
0.
4454
,
-
0.
2375
]).
to
(
torch_device
)
expected_slice
=
torch
.
tensor
([
0.
5588
,
0.
6853
,
-
0.
5929
]).
to
(
torch_device
)
self
.
assertTrue
(
torch
.
allclose
(
outputs
.
logits
[
0
,
:
3
],
expected_slice
,
atol
=
1e-4
))
self
.
assertTrue
(
torch
.
allclose
(
outputs
.
logits
[
0
,
:
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