Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
9a24b97b
Commit
9a24b97b
authored
Apr 08, 2022
by
Sylvain Gugger
Browse files
Fix style
parent
5db2fcc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
src/transformers/data/data_collator.py
src/transformers/data/data_collator.py
+3
-4
No files found.
src/transformers/data/data_collator.py
View file @
9a24b97b
...
@@ -220,12 +220,11 @@ class DataCollatorWithPadding:
...
@@ -220,12 +220,11 @@ class DataCollatorWithPadding:
Select a strategy to pad the returned sequences (according to the model's padding side and padding index)
Select a strategy to pad the returned sequences (according to the model's padding side and padding index)
among:
among:
- `True` or `'longest'` (default): Pad to the longest sequence in the batch (or no padding if only a single
sequence
- `True` or `'longest'` (default): Pad to the longest sequence in the batch (or no padding if only a single
is provided).
sequence
is provided).
- `'max_length'`: Pad to a maximum length specified with the argument `max_length` or to the maximum
- `'max_length'`: Pad to a maximum length specified with the argument `max_length` or to the maximum
acceptable input length for the model if that argument is not provided.
acceptable input length for the model if that argument is not provided.
- `False` or `'do_not_pad'`: No padding (i.e., can output a batch with sequences of different
- `False` or `'do_not_pad'`: No padding (i.e., can output a batch with sequences of different lengths).
lengths).
max_length (`int`, *optional*):
max_length (`int`, *optional*):
Maximum length of the returned list and optionally padding length (see above).
Maximum length of the returned list and optionally padding length (see above).
pad_to_multiple_of (`int`, *optional*):
pad_to_multiple_of (`int`, *optional*):
...
...
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