29 #ifndef LBANN_DATA_READER_MERGE_SAMPLES_HPP 30 #define LBANN_DATA_READER_MERGE_SAMPLES_HPP 53 std::string
get_type()
const override {
return "data_reader_merge_samples"; }
104 const std::vector<El::Int>& data_dims);
109 #endif // LBANN_DATA_READER_MERGE_SAMPLES_HPP int get_linearized_label_size() const override
Get the linearized size (i.e. number of elements) in a label.
std::string get_type() const override
data_reader_merge_samples(std::vector< generic_data_reader *> data_readers, bool shuffle=true)
data_reader_merge_samples * copy() const override
std::vector< int > m_num_samples_psum
Partial sums of the number of samples in each reader.
bool fetch_datum(CPUMat &X, int data_id, int mb_idx) override
int get_num_labels() const override
Return the number of labels (classes) in this dataset.
El::Matrix< DataType, El::Device::CPU > CPUMat
int get_linearized_response_size() const override
Get the linearized size (i.e. number of elements) in a response.
void setup_indices(int num_samples)
code common to both load() and load_using_data_store()
int get_linearized_data_size() const override
Get the linearized size (i.e. number of elements) in a sample.
size_t compute_num_samples_psum()
code common to both load() and load_using_data_store()
bool fetch_label(CPUMat &Y, int data_id, int mb_idx) override
void sanity_check_for_consistency(int num_labels, int data_size, int label_size, const std::vector< El::Int > &data_dims)
code common to both load() and load_using_data_store()
~data_reader_merge_samples() override
bool fetch_response(CPUMat &Y, int data_id, int mb_idx) override
const std::vector< int > & get_num_samples_psum()
support for data store functionality
const std::vector< El::Int > get_data_dims() const override
Get the dimensions of the data.
int get_num_responses() const override
Return the number of responses in this dataset.
data_reader_merge_samples & operator=(const data_reader_merge_samples &)
std::vector< generic_data_reader * > m_data_readers
List of readers providing data.
void load() override
Load subsidiary data readers.