Adding stochastic gradient descent.
rewrite nnet.