Adam

Optimization · Formula · Appears in 2 lessons

θt+1=θt−ηm^tv^t+ϵ\theta_{t+1} = \theta_t - \eta \frac{\hat{m}_t}{\sqrt{\hat{v}_t} + \epsilon}

Momentum and RMSProp in one optimiser: a running mean of gradients divided by a running mean of their magnitudes, both bias-corrected for their cold start. It is the default for transformer training, and the two extra states are why it costs three times the memory of plain SGD.

Symbols

m^t\hat{m}_t
Bias-corrected first moment — the mean gradient.
v^t\hat{v}_t
Bias-corrected second moment — the mean squared gradient.
ϵ\epsilon
A small constant for numerical stability.
Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark