Uniform Convergence of Gradients for Non-Convex Learning and Optimization