CNN explorer
A stage diagram says "Conv 3×3 → ReLU → MaxPool → … → FC". This page shows the arithmetic those boxes stand for, on an input you draw, with every intermediate tensor visible all the way to the class scores. Everything downstream recomputes when you change something upstream.
Input and kernel
16×16×1 image, one 3×3 filterPaint on the grid (click–drag; right-drag or shift erases). Pixel values are 0–1. The kernel is the set of learned weights in a real network; here you pick or type them.
Convolution, one position at a time
out[i,j] = Σ window ⊙ kernelScrub through the output positions. The yellow window on the (padded) input is multiplied elementwise with the kernel and summed into one output cell. That is the whole operation; a conv layer is this repeated at every position and for every kernel.
Nonlinearity and pooling
ReLU · pool 2×2 / stride 2ReLU clips negatives to zero: it keeps "evidence for" the pattern and drops "evidence against". Pooling then keeps the strongest (or average) response in each 2×2 block, halving height and width. Hover any cell: its receptive field lights up in green on the earlier maps and on the input. Neither step has learned parameters.
Many kernels, then a kernel over all channels
layer 1: 4 × (3×3×1) · layer 2: 8 × (3×3×4)A conv layer has many kernels; each produces its own feature map, and the maps stack into channels. The step that diagrams hide: a kernel in the next layer is not 3×3, it is 3×3×C — one 3×3 slice per input channel. Each slice convolves its channel, and the partial maps are summed into a single output. Shown here for the first of the eight layer-2 kernels. Click a bank slot to make it the kernel used in stages 1–3.
From feature maps to a prediction
pool 1 → conv 2 + ReLU → pool 2 → global average → FC → softmaxThe whole network end to end. After the last pooling, each channel is averaged over space into one number (global average pooling), so the image becomes a vector of 8 "how much of pattern j is present, anywhere". A fully connected (FC) layer maps that vector to 10 class scores: each of the 8 values connects to each of the 10 classes through its own weight, so the FC layer is just an 8×10 grid of numbers plus 10 biases — learned parameters exactly like the kernels, and the only other kind the network has. Softmax turns scores into probabilities. Hover any map cell for its receptive field, a vector entry to see which map it summarises, an FC weight to see which average and class it connects, or a class bar to see how its score is built. Layer-2 and FC weights here are random, so the prediction is arbitrary — training is what moves these weights until the right bar wins. The mechanics are exactly what a trained network does.
Terms
dotted words above point hereEverything on this page is built from these. Hover or tap a dotted term anywhere above for the same definition in place.