A Dynamical Systems Perspective on Optimization Algorithms