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

Method get_next_position

src/utils/dataset.cpp:112–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112int dataset::get_next_position() const
113{
114 /// If the next mini-batch for this rank is going to be the last
115 /// mini-batch, take the proper (possibly reduced) step to
116 /// setup for the last mini-batch
117 if (m_current_mini_batch_idx == (m_num_iterations_per_epoch - 1)) {
118 return m_current_pos + m_stride_to_last_mini_batch;
119 }
120 else {
121 return m_current_pos + m_stride_to_next_mini_batch;
122 }
123}
124
125void dataset::set_mini_batch_size(const int s) { m_mini_batch_size = s; }
126

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected