Machine Learning & AI
Intermediate

SGD with Momentum

Accelerates gradient descent by accumulating a velocity of past gradients.

Formula

v:=βv+(1β)J;    θ:=θαvv := \beta v + (1-\beta)\nabla J;\;\; \theta := \theta - \alpha v

Variables

vVelocity
\betaMomentum (~0.9)
\alphaLearning rate

Example

beta=0.9 keeps 90% of prior velocity

Did You Know?

Momentum helps the optimizer roll through small local dips and ravines like a ball gaining speed.

Share this formula