Produces the order in which a DataLoader visits a Dataset's indices for one epoch.
More...
#include <sampler.hpp>
|
| virtual | ~Sampler ()=default |
| |
| virtual void | reset (int64_t dataset_size)=0 |
| | Begins a new epoch over a dataset of the given size.
|
| |
| virtual std::optional< int64_t > | next ()=0 |
| | Fetches the next index in this epoch's order.
|
| |
Produces the order in which a DataLoader visits a Dataset's indices for one epoch.
- Note
- reset(dataset_size) is called once per epoch (DataLoader::reset_epoch()); next() is called once per sample within that epoch, returning std::nullopt once every index has been produced.
◆ ~Sampler()
| virtual pulsatrix::Sampler::~Sampler |
( |
| ) |
|
|
virtualdefault |
◆ next()
| virtual std::optional< int64_t > pulsatrix::Sampler::next |
( |
| ) |
|
|
pure virtual |
◆ reset()
| virtual void pulsatrix::Sampler::reset |
( |
int64_t |
dataset_size | ) |
|
|
pure virtual |
The documentation for this class was generated from the following file: