Deep Learning Algorithm Implementations 1.0.0
C++ implementations of fundamental deep learning algorithms
|
#include <data_loader.hpp>
Public Member Functions | |
DataLoader (const Dataset< T > &dataset, size_t batch_size, bool shuffle=false) | |
Constructor for data loader. | |
bool | has_next () const |
Check if more batches are available in current epoch. | |
std::pair< MatrixD, MatrixD > | next_batch () |
Get the next batch of data. | |
void | reset () |
Reset iterator to start of dataset. | |
Definition at line 129 of file data_loader.hpp.
dl::utils::DataLoader< T >::DataLoader | ( | const Dataset< T > & | dataset, |
size_t | batch_size, | ||
bool | shuffle = false |
||
) |
Constructor for data loader.
dataset | Reference to the dataset to iterate over |
batch_size | Number of samples per batch |
shuffle | Whether to shuffle data at the start of each epoch |
Definition at line 59 of file data_loader.cpp.
bool dl::utils::DataLoader< T >::has_next | ( | ) | const |
Check if more batches are available in current epoch.
Definition at line 65 of file data_loader.cpp.
std::pair< MatrixD, MatrixD > dl::utils::DataLoader< T >::next_batch | ( | ) |
Get the next batch of data.
Definition at line 71 of file data_loader.cpp.
void dl::utils::DataLoader< T >::reset | ( | ) |
Reset iterator to start of dataset.
Definition at line 84 of file data_loader.cpp.