torch.utils.data.dataloader — PyTorch 1.10.1 documentation
pytorch.org › torch › utilsclass DataLoader (Generic [T_co]): r """ Data loader. Combines a dataset and a sampler, and provides an iterable over the given dataset. The :class:`~torch.utils.data.DataLoader` supports both map-style and iterable-style datasets with single- or multi-process loading, customizing loading order and optional automatic batching (collation) and memory pinning.
DataLoader.__len__ for IterableDataset · Issue #37753 ...
github.com › pytorch › pytorchMay 04, 2020 · The __len__ method on the DataLoader seems to be used mainly for progress bars. Yet, the unit tests and the internal checks seem to be assuming an exact computation of length. Exact lengths can be very costly to determine in general for IterableDataset (though reasonable estimates are usually available). (for unusual circumstances) allow the ...