mediumDeep Learning & Neural NetworksReviewed Jul 24, 2026

How do optimizers like SGD and Adam differ, and what do learning rate, batch size, and epochs mean?

Optimizers decide how to update weights from gradients. SGD updates in the direction of the negative gradient of a mini-batch; adding momentum accumulates past gradients to accelerate and smooth updates. Adam combines momentum with per-parameter adaptive learning rates using running estimates of the first and second moments of the gradient, so it often converges fast with little tuning, making it a common default; well-tuned SGD with momentum can generalize better on some tasks. Key hyperparameters: the learning rate scales each update and is the most important to tune, since too high diverges and too low is slow. Batch size is how many examples are used per update; larger batches give smoother gradients but need more memory. An epoch is one full pass over the training set, and models typically train for many epochs, often with a learning-rate schedule.

optimizerssgdadamhyperparameters

More Deep Learning & Neural Networks questions

See all Deep Learning & Neural Networks questions →