31 virtual void reset(int64_t dataset_size) = 0;
37 [[nodiscard]]
virtual std::optional<int64_t>
next() = 0;
43 void reset(int64_t dataset_size)
override;
44 [[nodiscard]] std::optional<int64_t>
next()
override;
48 int64_t position_ = 0;
59 void reset(int64_t dataset_size)
override;
60 [[nodiscard]] std::optional<int64_t>
next()
override;
65 std::vector<int64_t> indices_;
Produces the order in which a DataLoader visits a Dataset's indices for one epoch.
Definition sampler.hpp:20
virtual std::optional< int64_t > next()=0
Fetches the next index in this epoch's order.
virtual void reset(int64_t dataset_size)=0
Begins a new epoch over a dataset of the given size.
virtual ~Sampler()=default
Visits indices [0, dataset_size) in ascending order.
Definition sampler.hpp:41
void reset(int64_t dataset_size) override
Begins a new epoch over a dataset of the given size.
std::optional< int64_t > next() override
Fetches the next index in this epoch's order.
Visits indices [0, dataset_size) in a seeded pseudo-random permutation – reproducible across runs giv...
Definition sampler.hpp:56
ShuffleSampler(unsigned seed)
void reset(int64_t dataset_size) override
Begins a new epoch over a dataset of the given size.
std::optional< int64_t > next() override
Fetches the next index in this epoch's order.
Definition acquisition_functions.hpp:16