MCPcopy Create free account
hub / github.com/LBANN/lbann / fetch_datum

Method fetch_datum

src/data_readers/data_reader_mesh.cpp:79–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79bool mesh_reader::fetch_datum(CPUMat& X, int data_id, int mb_idx)
80{
81 if (m_random_flips) {
82 fast_rng_gen& gen = get_fast_io_generator();
83 std::uniform_int_distribution<int> dist(0, 1);
84 m_flip_choices[data_id].first = dist(gen);
85 m_flip_choices[data_id].second = dist(gen);
86 }
87 for (size_t i = 0; i < m_channels.size(); ++i) {
88 Mat X_view = El::View(X,
89 El::IR(i * m_data_height * m_data_width,
90 (i + 1) * m_data_height * m_data_width),
91 El::IR(mb_idx));
92 load_file(data_id, m_channels[i], X_view);
93 }
94 return true;
95}
96
97bool mesh_reader::fetch_response(CPUMat& Y, int data_id, int mb_idx)
98{

Callers

nothing calls this directly

Calls 4

ViewFunction · 0.85
IRClass · 0.85
load_fileFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected