Template Struct Sequencer

Inheritance Relationships

Derived Types

Struct Documentation

template<typename Result>
struct torch::data::detail::sequencers::Sequencer

A Sequencer accepts a function that yields the next result of a DataLoader and then has the opportunity to influence the order in which these results are returned.

The NoSequencer does not enforce any sequencing and returns any result directly. The OrderedSequencer instead buffers results internally to return them in order of their sequence number.

Subclassed by torch::data::detail::sequencers::NoSequencer< Result >, torch::data::detail::sequencers::OrderedSequencer< Result >

Public Types

using ResultProducer = std::function<optional<Result>()>

Public Functions

~Sequencer() = default
optional<Result> next(ResultProducer next_result) = 0


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