🎯 Setting Initial Hyperparameter Values: Gradient-Descent Landscape (2D)
2D gradient-descent lab: a hand-defined non-convex loss surface with three local minima, a real θ = θ − lr·∇L(θ) update with momentum, and live controls for initial point and learning rate so you can watch initialization decide which minimum — or whether the run diverges — in real time.
This 2D companion shows directly, on a flat canvas, why initial values are a hyperparameter in their own right: a hand-defined non-convex loss surface with a shallow local minimum, a medium local minimum and a deeper global minimum sits behind a real momentum gradient-descent optimizer running the update θ ← θ + β·v − lr·∇L(θ) on the surface's analytic gradient every frame. Drag the initial point and the same optimizer settles into a different basin; push the learning rate past the curvature of a well and the same starting point diverges instead of converging; drop it too low and convergence crawls — three real, verifiable effects of the numbers you set before training even starts.
2D gradient-descent lab with a hand-defined non-convex loss surface, three local minima, and a real momentum update θ ← θ + β·v − lr·∇L(θ) driven by initial-point, learning-rate and momentum controls.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install