computing finite difference for EM and LBFGS
adding SGD.py