| 110 | } |
| 111 | |
| 112 | int 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 | |
| 125 | void dataset::set_mini_batch_size(const int s) { m_mini_batch_size = s; } |
| 126 |
no outgoing calls
no test coverage detected