Template Struct SentinelIterator

Inheritance Relationships

Base Type

Struct Documentation

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

Public Functions

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

Does double dispatch.

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

Calls the comparison operator between ValidIterator and SentinelIterator.

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

Sentinel iterators always compare equal.


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