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
d13eca11
Unverified
Commit
d13eca11
authored
Apr 17, 2020
by
Patrick von Platen
Committed by
GitHub
Apr 17, 2020
Browse files
Higher tolerance for past testing in T5 (#3843)
parent
b0c9fbb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
tests/test_modeling_t5.py
tests/test_modeling_t5.py
+1
-1
No files found.
tests/test_modeling_t5.py
View file @
d13eca11
...
@@ -244,7 +244,7 @@ class T5ModelTest(ModelTesterMixin, unittest.TestCase):
...
@@ -244,7 +244,7 @@ class T5ModelTest(ModelTesterMixin, unittest.TestCase):
output_from_past_slice
=
output_from_past
[:,
0
,
random_slice_idx
].
detach
()
output_from_past_slice
=
output_from_past
[:,
0
,
random_slice_idx
].
detach
()
# test that outputs are equal for slice
# test that outputs are equal for slice
self
.
parent
.
assertTrue
(
torch
.
allclose
(
output_from_past_slice
,
output_from_no_past_slice
,
atol
=
1e-
6
))
self
.
parent
.
assertTrue
(
torch
.
allclose
(
output_from_past_slice
,
output_from_no_past_slice
,
atol
=
1e-
3
))
def
create_and_check_t5_decoder_model_attention_mask_past
(
def
create_and_check_t5_decoder_model_attention_mask_past
(
self
,
config
,
input_ids
,
decoder_input_ids
,
attention_mask
,
decoder_attention_mask
,
lm_labels
,
self
,
config
,
input_ids
,
decoder_input_ids
,
attention_mask
,
decoder_attention_mask
,
lm_labels
,
...
...
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