gd sgd changed for sparse