Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IterableDataset #19228

Closed
wants to merge 18 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
say more about custom collate_fn in docs
  • Loading branch information
ssnl committed Jun 20, 2019
commit eae470ea2a44fb8f046b7e14089cd4748cc8effc
7 changes: 5 additions & 2 deletions docs/source/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ and loading from an iterable-style dataset is roughly equivalent with::
for indices in batch_sampler:
yield collate_fn([next(dataset_iter) for _ in indices])

See `this section <dataloader-collate_fn_>`_ on more about :attr:`collate_fn`.
A custom :attr:`collate_fn` can be used to customize collation, e.g., padding
sequential data to max length of a batch. See
`this section <dataloader-collate_fn_>`_ on more about :attr:`collate_fn`.

Disable automatic batching
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -225,7 +227,8 @@ properties:
for ``list`` s, ``tuple`` s, ``namedtuple`` s, etc.

Users may use customized :attr:`collate_fn` to achieve custom batching, e.g.,
along a dimension other than the first, or to add support for custom data types.
collating along a dimension other than the first, padding sequences of
various lengths, or adding support for custom data types.

Single- and Multi-process Data Loading
--------------------------------------
Expand Down