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
a5751f75
Commit
a5751f75
authored
Mar 08, 2020
by
patrickvonplaten
Committed by
Patrick von Platen
Mar 11, 2020
Browse files
fix bug with attention_mask as optional input argument
parent
629aac92
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 @
a5751f75
...
...
@@ -313,7 +313,7 @@ class BartHeadTests(unittest.TestCase):
config
,
input_ids
,
batch_size
=
self
.
_get_config_and_data
(
output_past
=
True
)
attention_mask
=
input_ids
.
ne
(
1
)
lm_model
=
BartForConditionalGeneration
(
config
).
eval
().
to
(
torch_device
).
half
()
lm_model
.
generate
(
input_ids
,
attention_mask
)
lm_model
.
generate
(
input_ids
,
attention_mask
=
attention_mask
)
def
test_prepare_bart_decoder_inputs
(
self
):
config
,
*
_
=
self
.
_get_config_and_data
(
output_past
=
False
)
...
...
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