cosine annealing does: lr = lr_min + 0.5(lr_max - lr_min)(1 + cos(πt/T))

Ever wondered how a computer decides what's more important when sorting through tons of data?

Image: ManfredKloeppel, CC BY 3.0, via Wikimedia Commons

cosine annealing does: lr = lr_min + 0.5(lr_max - lr_min)(1 + cos(πt/T))

Ever wondered how a computer decides what's more important when sorting through tons of data?

Imagine you're trying to quickly find your favorite song in a massive playlist. You want the most popular songs to appear first.

Think of it like tuning a radio dial. You start at a certain frequency (learning rate) and gradually adjust it to find the best signal (optimal learning rate) for your favorite station (model performance).

Example

If you start at a high frequency and keep adjusting until you hit the sweet spot, that's like finding the best learning rate for your model.

Remember this

Cosine annealing smoothly adjusts the learning rate to find the best performance.

Related concepts

Swipe through 100 ML concepts daily

Open Pocket Polymath