liveBook · Manning

AdamW

AdamW is an adaptive gradient-based optimization algorithm that combines Adam’s moment-based parameter updates with weight decay applied independently of those updates.

How 3 Manning books explain it

Inside Deep Learning: Math, Algorithms, Models

A variant of Adam that corrects the original algorithm’s issue and is used as the default optimizer in this book.

How it is used
Uses AdamW as a practical default optimizer while postponing detailed optimizer tuning until architecture selection is complete.
How deep it goes
Defines AdamW, demonstrates PyTorch training, and compares learning curves, but defers the variants’ detailed pros and cons.
Examples
Demonstrates fully connected-network training, accuracy plots, cosine annealing, batch-size comparisons, deeper networks, and RNN experiments.
What you can do after
Apply it via PyTorch, compare it with SGD variants, and evaluate its behavior with cosine annealing and different architectures.

Read how Inside Deep Learning: Math, Algorithms, Models explains AdamW →

Build a Text-to-Image Generator (from Scratch)

AdamW is an adaptive gradient-based optimizer that decouples weight decay from the parameter update.

How it is used
Optimizes ViT classifiers and diffusion denoising U-Nets during gradient-based training.
How deep it goes
Defines decoupled weight decay and demonstrates configurations, but stops short of deriving AdamW’s update equations.
Examples
Uses PyTorch configurations for CIFAR-10 ViT classification and diffusion-based denoising U-Net training.
What you can do after
Apply it via PyTorch to optimize neural networks with configurable learning rates, weight decay, and optimizer parameters.

Read how Build a Text-to-Image Generator (from Scratch) explains AdamW →

Build a Large Language Model (From Scratch)

An adaptive optimization algorithm that maintains historical information to adjust learning rates for neural-network parameters.

How it is used
Regularizes GPT pretraining while updating model parameters batch by batch.
How deep it goes
Defines the regularization rationale and shows configuration, but stops short of deriving AdamW update equations.
Examples
Uses a PyTorch GPTModel configuration with learning rate 0.0004, weight decay 0.1, and ten training epochs.
What you can do after
Operate/configure AdamW in a PyTorch training loop and monitor losses for generalization problems.

Read how Build a Large Language Model (From Scratch) explains AdamW →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.