stochastic grad descent by reusing batch grad descent