Gradient Descent versus Heavy-Ball Momentum on Contour Lines (2D)
Contour lines of an elongated quadratic valley with the gradient-descent and heavy-ball paths drawn step by step, plus the live loss curve and the theoretical convergence rates. Same shared model as the 3D scene.
Two balls roll down the same elongated quadratic valley: one takes plain gradient-descent steps, the other adds heavy-ball momentum. Change the valley condition number, the step size and the momentum and watch zig-zagging, convergence, overshoot and divergence. Spectral-radius rates, the optimal step and the square-root speed-up of momentum are checked numerically.
Contour lines of an elongated quadratic valley with the gradient-descent and heavy-ball paths drawn step by step, plus the live loss curve and the theoretical convergence rates. Same shared model as the 3D scene.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install