Unverified Commit 5db2fcc6 authored by Alan Lee's avatar Alan Lee Committed by GitHub
Browse files

Fix error in doc of `DataCollatorWithPadding` (#16662)

The defalut value of `padding` in `DataCollatorWithPadding` is `True`, not `False`.
parent 9db2eebb
......@@ -220,11 +220,11 @@ class DataCollatorWithPadding:
Select a strategy to pad the returned sequences (according to the model's padding side and padding index)
among:
- `True` or `'longest'`: 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 sequence
is provided).
- `'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.
- `False` or `'do_not_pad'` (default): 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).
max_length (`int`, *optional*):
Maximum length of the returned list and optionally padding length (see above).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment