Shadowing Properties of Optimization Algorithms