29 #ifndef LBANN_DATA_READER_MESH_HPP 30 #define LBANN_DATA_READER_MESH_HPP 49 std::string
get_type()
const override {
return "mesh_reader"; }
65 void setup(
int num_io_threads,
89 void load_file(
int data_id,
const std::string channel,
Mat& mat);
105 "VectorComp_AvgVelocity_R",
106 "VolumeFractions_bubble",
150 #endif // LBANN_DATA_READER_MESH_HPP std::vector< std::string > m_channels
Names of each channel to load as data.
void set_suffix(const std::string suffix)
Set a suffix to append to the channel directories.
std::string m_target_name
Target channel; contains the relaxation information.
std::string m_suffix
A suffix to append to each channel directory (e.g. "128").
int get_linearized_data_size() const override
Get the linearized size (i.e. number of elements) in a sample.
const std::vector< El::Int > get_data_dims() const override
Get the dimensions of the data.
std::string m_index_format_str
Format string for the index.
std::vector< std::pair< bool, bool > > m_flip_choices
bool fetch_datum(CPUMat &X, int data_id, int mb_idx) override
void horizontal_flip(CPUMat &mat)
Flip mat horizontally (i.e. about its vertical axis).
void set_data_shape(int height, int width)
Set the shape (height and width) of the data.
void set_index_length(int l)
Set the index length for filenames.
El::Matrix< DataType, El::Device::CPU > CPUMat
typename std::add_pointer< T >::type observer_ptr
Creating an observer_ptr to complement the unique_ptr and shared_ptr.
int get_linearized_response_size() const override
Get the linearized size (i.e. number of elements) in a response.
bool fetch_response(CPUMat &Y, int data_id, int mb_idx) override
bool m_random_flips
Whether to do random horizontal/vertical flips.
int m_data_height
X dimension of the mesh data.
std::string get_type() const override
El::Matrix< DataType, El::Device::CPU > Mat
void set_random_flips(bool b)
Set whether to do random horizontal and vertical flips.
std::vector< std::vector< DataType > > m_load_bufs
Buffers for loading data into.
mesh_reader(bool shuffle=true)
void load_file(int data_id, const std::string channel, Mat &mat)
void vertical_flip(CPUMat &mat)
Flip mat vertically (i.e. about its horizontal axis).
void setup(int num_io_threads, observer_ptr< thread_pool > io_thread_pool) override
mesh_reader * copy() const override
int m_data_width
Y dimension of the mesh data.
int m_num_samples
Number of samples.
std::string construct_filename(std::string channel, int data_id)
Return the full path to the data file for datum data_id's channel.