Template Class StatelessDataLoader

Inheritance Relationships

Base Type

Class Documentation

template<typename Dataset, typename Sampler>
class torch::data::StatelessDataLoader : public torch::data::DataLoaderBase<Dataset, Dataset::BatchType, Sampler::BatchRequestType>

A dataloader for stateless datasets.

This dataloader follows the traditional PyTorch dataloader design, whereby a (posssibly) stateful sampler produces batch requests for a stateless dataset, which acts as a simple batch request to batch mapping. The batch request will often be an array of indices, and if the dataset is a simple image dataset, the dataset would produce the images at those indices.

Public Types

using super = DataLoaderBase<Dataset, typename Dataset::BatchType, typename Sampler::BatchRequestType>
using BatchRequestType = BatchRequest

Public Functions

StatelessDataLoader(Dataset dataset, Sampler sampler, DataLoaderOptions options)

Constructs the StatelessDataLoader from a dataset, a sampler and some options.


Access comprehensive developer documentation for PyTorch

View Docs


Get in-depth tutorials for beginners and advanced developers

View Tutorials


Find development resources and get your questions answered

View Resources