Measuring performance when working with a manual minibatch loop