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
38f6739c
Unverified
Commit
38f6739c
authored
Oct 25, 2020
by
Suraj Patil
Committed by
GitHub
Oct 24, 2020
Browse files
[doc prepare_seq2seq_batch] fix docs (#8013)
parent
00602f78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
src/transformers/tokenization_bart.py
src/transformers/tokenization_bart.py
+1
-1
src/transformers/tokenization_utils_base.py
src/transformers/tokenization_utils_base.py
+2
-4
No files found.
src/transformers/tokenization_bart.py
View file @
38f6739c
...
@@ -122,7 +122,7 @@ class BartTokenizer(RobertaTokenizer):
...
@@ -122,7 +122,7 @@ class BartTokenizer(RobertaTokenizer):
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model.
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model.
- **labels** -- List of token ids for tgt_texts
- **labels** -- List of token ids for tgt_texts
The full set of keys ``[input_ids, attention_mask,
decoder_input_ids, decoder_attention_mask
]``,
The full set of keys ``[input_ids, attention_mask,
labels
]``,
will only be returned if tgt_texts is passed. Otherwise, input_ids, attention_mask will be the only keys.
will only be returned if tgt_texts is passed. Otherwise, input_ids, attention_mask will be the only keys.
"""
"""
kwargs
.
pop
(
"src_lang"
,
None
)
kwargs
.
pop
(
"src_lang"
,
None
)
...
...
src/transformers/tokenization_utils_base.py
View file @
38f6739c
...
@@ -1364,11 +1364,9 @@ PREPARE_SEQ2SEQ_BATCH_DOCSTRING = """
...
@@ -1364,11 +1364,9 @@ PREPARE_SEQ2SEQ_BATCH_DOCSTRING = """
- **input_ids** -- List of token ids to be fed to the encoder.
- **input_ids** -- List of token ids to be fed to the encoder.
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model.
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model.
- **decoder_input_ids** -- List of token ids to be fed to the decoder.
- **labels** -- List of token ids for tgt_texts.
- **decoder_attention_mask** -- List of indices specifying which tokens should be attended to by the decoder.
This does not include causal mask, which is built by the model.
The full set of keys ``[input_ids, attention_mask,
decoder_input_ids, decoder_attention_mask
]``,
The full set of keys ``[input_ids, attention_mask,
labels
]``,
will only be returned if tgt_texts is passed. Otherwise, input_ids, attention_mask will be the only keys.
will only be returned if tgt_texts is passed. Otherwise, input_ids, attention_mask will be the only keys.
"""
"""
...
...
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