rewritten SGDSolver as NAG, added AdaGrad