Modified conjugate gradient to regularize only at the end