My data size is 6011, which is a prime number, and therefore, the only batch size number that divides this data evenly is either 1 or 6011. However, I need the batch size to be 32, which means that the steps_per_epoch with being equal to ${6011 \over 32} = 187.84$.

My question is what will happen to the last step of training (step number 188) if I set the steps_per_epoch to $188$? Will it contain the remaining samples which are $6011-(187*32)= 27$ samples?

  • $\begingroup$ Yes I think so. What framework are you using? $\endgroup$ Dec 17, 2021 at 0:39
  • $\begingroup$ @ashutoshsingh keras $\endgroup$
    – AAA
    Dec 17, 2021 at 1:24
  • $\begingroup$ Then it should work $\endgroup$ Dec 17, 2021 at 23:04


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.