Called at the beginning of a batch during prediction phase.
index of batch.
Number of samples in the current batch.