AI Grounds
Open AI Grounds on a desktop
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
AI Grounds
These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.
Guided discovery
Step a batch. Watch weights change.
Four training rows and two different held-out rows. Only training rows supply gradients. This is a deterministic teaching network, not a trained production model.
Next: Forward · Epoch 0 · Updates 0 · Changed parameters: 0 of 9 · Next training rows: A1, A2.
Forward computes this batch's predictions; weights stay fixed.
Changing batch size restarts this run. All means four rows averaged before one update.
Step multiplier. An edit discards pending batch arithmetic and keeps the parameters. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.
Mean over all four training rows at current parameters.
0.589058
mean BCE(training)
The update itself uses only its current batch.
Mean over two held-out rows; not fitted.
0.573756
mean BCE(held-out)
A decrease is not guaranteed or evidence about all future data.
| Parameter | Initial | Current |
|---|---|---|
| w11 | 0.600000 | 0.600000 |
| w12 | -0.200000 | -0.200000 |
| w21 | -0.300000 | -0.300000 |
| w22 | 0.800000 | 0.800000 |
| b1 | 0.100000 | 0.100000 |
| b2 | 0.100000 | 0.100000 |
| v1 | 0.500000 | 0.500000 |
| v2 | -0.400000 | -0.400000 |
| bOutput | 0.000000 | 0.000000 |
Solid indigo: full Training loss. Dashed orange: Validation loss. No fabricated history at update zero; exact current losses are above.
| Row | x1 | x2 | Label | Split |
|---|---|---|---|---|
| A1 | -1 | -1 | 0 | Training |
| A2 | -1 | 1 | 0 | Training |
| A3 | 1 | -1 | 1 | Training |
| A4 | 1 | 1 | 1 | Training |
| H1 | -0.5 | 0.5 | 0 | Held-out |
| H2 | 0.5 | -0.5 | 1 | Held-out |
BCE=max(z,0)−label×z+ln(1+exp(−|z|)). Its score derivative is p−label. ReLU's derivative is zero at zero. Row gradients are averaged before Update; no batch accumulation across updates.
Execute Forward to populate a batch trace.
| Update | Training | Validation |
|---|
Fixed row order, no shuffling, momentum, regularization or early stopping. Batch size edits restart parameters. Run one epoch finishes the remaining batches if already partway through an epoch. The tiny held-out set is validation evidence, not a final-test score or a guarantee. Display rounds to six decimals; all computations use full precision.
Deep Learning · Batch and minibatch optimization