Changed LossAndDeriv to LossDeriv