Working with Batch and Stochastic Training