Newton Losses: Using Curvature Information for Learning with Differentiable Algorithms