torch.utils.data.sampler — PyTorch 1.10.1 documentation
pytorch.org › torch › utilsclass Sampler (Generic [T_co]): r """Base class for all Samplers. Every Sampler subclass has to provide an :meth:`__iter__` method, providing a way to iterate over indices of dataset elements, and a :meth:`__len__` method that returns the length of the returned iterators... note:: The :meth:`__len__` method isn't strictly required by:class:`~torch.utils.data.DataLoader`, but is expected in any ...