The same network can train fast, slowly, noisily or not at all. Only the optimiser, step size, batch size and schedule change. Explore each factor here, then run the controlled experiments on Fashion-MNIST in Colab.
Lab 1 showed step size on a one-dimensional bowl. Real losses are stretched: steep in some directions, shallow in others. Here the bowl is L = ½(x² + K·y²). Raise K and the contours squash into a narrow valley. All four optimisers start at the same point and use exact gradients, so every difference comes from the update rule.
Making the bowl rounder is what input scaling and normalisation layers do for you. At K = 1 every optimiser takes a straight path. At K = 10 plain SGD zig-zags across the valley, momentum builds speed along it, and RMSProp and Adam rescale each direction.
Mini-batch SGD uses g = (1/B) Σ ∇ℓ over B examples instead of all 50,000. Each draw below is the mean gradient of one batch for a single weight. The spread of those means shrinks like σ/√B, but a larger batch also means fewer updates per epoch.
The table uses the lab's 50,000 training images. In Colab the batch-32 run does about 1,563 updates per epoch against 98 for batch 512, so it takes noticeably longer in wall-clock time.
A high learning rate makes fast early progress but keeps the weights bouncing around the minimum. Lowering it later lets them settle. The lab halves the rate every three epochs. Change the schedule and compare with a constant rate.
A simulation: bounce scales with the current rate and the floor drops as the rate falls. Your Colab curves will be noisier, but the loss should settle after each reduction.
In Colab the step rule is step_decay(epoch, lr). It halves when the epoch index is 3, 6 and 9, so the 4th, 7th and 10th epochs are the first to use a lower rate.
AdamW shrinks every weight by a factor of (1 − η·λ) at each step, on top of the gradient step. With the lab's η = 0.001 and λ = 0.0001 that factor is 0.9999999. Set the numbers below to see what that adds up to over a full run.
Batch size 128 gives 391 updates per epoch. If AdamW is missing in your TensorFlow version, the lab falls back to plain Adam, which has no decay at all.
Batch Normalisation is the other half of Task 10. It re-centres and re-scales each layer's inputs, which keeps the loss surface closer to the round bowl above. The BatchNorm demo is in Lab 3, next to Dropout.
Choose a setup and watch the training and validation curves for the 256-128 network on Fashion-MNIST. The curves are a simulation tuned to typical behaviour, so your Colab numbers will differ. The ordering and the shapes should look familiar. The Adam baseline is drawn dashed for comparison.
Copy each cell into Colab and run them in order. Setup, loading and preprocessing are one card because they run together. Task numbers match the lab sheet. The Adam run in Task 6, the 0.001 run in Task 7 and the batch-128 run in Task 8 repeat the Task 5 baseline, so you can reuse its result if time is short.
Answers are saved in this browser only. Open a hint after you have tried.