API symbolsutils
Copy
Sampler
- class tensorplay.utils.data.Sampler[source]
Base class for all Samplers.
Every Sampler subclass has to provide an
__iter__()method, providing a way to iterate over indices or lists of indices (batches) of dataset elements, and may provide a__len__()method that returns the length of the returned iterators.Note
The
__len__()method isn’t strictly required byDataLoader, but is expected in any calculation involving the length of a DataLoader.
Help improve this page
Found an error, an unclear step, or a missing example?
Was this page helpful?
