Shortcuts

Template Struct SentinelIterator

Inheritance Relationships

Base Type

Struct Documentation

template<typename Batch>
struct torch::data::detail::SentinelIterator : public torch::data::detail::IteratorImpl<Batch>

Public Functions

void next() override
Batch &get() override
bool operator==(const IteratorImpl<Batch> &other) const override

Does double dispatch.

bool operator==(const ValidIterator<Batch> &other) const override

Calls the comparison operator between ValidIterator and SentinelIterator.

bool operator==(const SentinelIterator<Batch> &other) const override

Sentinel iterators always compare equal.

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