Rate this Page

Template Struct Sequencer#

Inheritance Relationships#

Derived Types#

Struct Documentation#

template<typename Result>
struct 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<std::optional<Result>()>#

Public Functions

virtual ~Sequencer() = default#
virtual std::optional<Result> next(ResultProducer next_result) = 0#