Make gradient descent more efficient.