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
3fb82f74
Unverified
Commit
3fb82f74
authored
May 16, 2022
by
Yih-Dar
Committed by
GitHub
May 16, 2022
Browse files
Fix FlavaForPreTrainingIntegrationTest CI test (#17232)
Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
9b0d2860
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/models/flava/test_modeling_flava.py
tests/models/flava/test_modeling_flava.py
+1
-1
No files found.
tests/models/flava/test_modeling_flava.py
View file @
3fb82f74
...
@@ -1219,6 +1219,6 @@ class FlavaForPreTrainingIntegrationTest(unittest.TestCase):
...
@@ -1219,6 +1219,6 @@ class FlavaForPreTrainingIntegrationTest(unittest.TestCase):
expected_logits
=
torch
.
tensor
([[
16.1291
,
8.4033
],
[
16.1291
,
8.4033
]],
device
=
torch_device
)
expected_logits
=
torch
.
tensor
([[
16.1291
,
8.4033
],
[
16.1291
,
8.4033
]],
device
=
torch_device
)
self
.
assertTrue
(
torch
.
allclose
(
outputs
.
contrastive_logits_per_image
,
expected_logits
,
atol
=
1e-3
))
self
.
assertTrue
(
torch
.
allclose
(
outputs
.
contrastive_logits_per_image
,
expected_logits
,
atol
=
1e-3
))
self
.
assertAlmostEqual
(
outputs
.
loss_info
.
mmm_text
.
item
(),
1.75533199
)
self
.
assertAlmostEqual
(
outputs
.
loss_info
.
mmm_text
.
item
(),
1.75533199
,
places
=
4
)
self
.
assertAlmostEqual
(
outputs
.
loss_info
.
mmm_image
.
item
(),
7.0290069
,
places
=
4
)
self
.
assertAlmostEqual
(
outputs
.
loss_info
.
mmm_image
.
item
(),
7.0290069
,
places
=
4
)
self
.
assertAlmostEqual
(
outputs
.
loss
.
item
(),
11.0626
,
places
=
4
)
self
.
assertAlmostEqual
(
outputs
.
loss
.
item
(),
11.0626
,
places
=
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