Shortcuts

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<optional<Result>()>

Public Functions

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

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources