Make field private.
Separately keep the actual and the user-given number of training samples per iteration.