sgd and implicit updates complete for squared and hinge losses