Skip to content

tenzr::data::DataLoaderOptions

Configuration for a DataLoader.

#include <dataloader.h>

Public Attributes

Name
size_t batch_size
bool shuffle
Reshuffle the index order each pass.
std::optional< uint64_t > seed
Optional PRNG seed for shuffling.
size_t num_workers
bool drop_last
bool pin_memory
size_t prefetch_factor

Public Attributes Documentation

variable batch_size

size_t batch_size {32};

variable shuffle

bool shuffle {false};

Reshuffle the index order each pass.

variable seed

std::optional< uint64_t > seed {std::nullopt};

Optional PRNG seed for shuffling.

variable num_workers

size_t num_workers {0};

variable drop_last

bool drop_last {false};

variable pin_memory

bool pin_memory {true};

variable prefetch_factor

size_t prefetch_factor {2};