Convergence of Momentum-Based Optimization Algorithms with Time-Varying Parameters