1 #include "oneapi/dnnl/dnnl.hpp"
11 #include "intel_utils.h"
37 DataLoader(std::string features_path, std::string labels_path,
int _minibatch_size, std::vector<int> dataset_shape, dnnl::engine _eng);
39 int dataset_idx, sample_size;
40 void load_from_file(std::string filename, std::vector<float> &data);
DataLoader allows to create a dataloader object to implement minibatch stochastic gradient descent.
Definition: data_loader.h:18
int dataset_size
Total number of samples.
Definition: data_loader.h:20
void write_to_memory(dnnl::memory dst_mem_features, dnnl::memory dst_mem_labels)
Method that writes the curr batch to memory and moves the index forward.
std::vector< float > curr_batch_labels
Vector containing the labels that will be written to the engine.
Definition: data_loader.h:25
std::vector< float > dataset_labels
Vector containing the labels.
Definition: data_loader.h:23
std::vector< float > curr_batch
Vector containing the current batch that will be written to the engine.
Definition: data_loader.h:24
int minibatch_size
Minibatch size.
Definition: data_loader.h:21
std::vector< float > dataset
Vector containing the entire dataset.
Definition: data_loader.h:22
DataLoader(std::string features_path, std::string labels_path, int _minibatch_size, std::vector< int > dataset_shape, dnnl::engine _eng)
Construct a new Data Loader object.