This page is the ground floor. The parent note Stride, padding, and dilation throws symbols like Win, k, s, p, d, and ⌊⋅⌋ at you fast. Here we earn every one of them from a blank page, in an order where each idea leans on the one before it. If you have never seen a convolution, start at line one.
Before any symbol, a picture. A digital image is not a photo — to a computer it is a grid of numbers. Each little square (a pixel) holds one number (brightness). We line them up in rows and columns, like graph paper.
Look at the figure: the top-left cell is at position 0, and we count 0,1,2,… moving right. This "start at zero" choice is why a later formula ends in +1 — we will meet that surprise head-on.
Picture: in the figure above, the grid is 7 cells across, so Win=7. Count top to bottom for Hin.
Why the topic needs it: everything the parent note does is bookkeeping about size — you feed in a grid of a known size and you want to know the size that comes out. Win is the starting number in that arithmetic. We use width and height separately because an image can be a rectangle, but every formula is identical for both, so we usually just track width and copy the result.
Picture: the amber square in the next figure is a 3×3 kernel (k=3) sitting on top of the input.
What "sliding" means: we place the kernel over a patch of the image, multiply each kernel number by the pixel under it, add all those products into one output number, then slide the kernel to the next spot and repeat. Every landing spot produces exactly one output cell.
Why the topic needs k: the kernel must fit entirely inside the image at every landing spot. A bigger k means fewer spots fit, so k directly shrinks the output. That is the seed of the whole output-size formula.
Picture: below, the same kernel lands at cells 0,2,4 when s=2 — the amber outlines show the three landing positions, and the gaps between them are the skips.
Why the topic needs s: stride changes how many landing positions exist. With bigger jumps you cover the same distance in fewer landings, so s appears as a division in the output formula — dividing the room-to-move by the step size.
Picture: the cyan ring of zeros around the original grid in the next figure is padding with p=1. The original grid is untouched inside; the padding just gives the kernel more room to land near the edges.
Why the 2p? We add p cells on the leftandp cells on the right, so the width grows by 2p in total. That is exactly why every formula uses Win+2p: the effective width the kernel actually sees.
Picture: think of the kernel's cells as fingers of a hand. d=1 is fingers pressed together; d=2 spreads them so each finger touches a wider, sparser area of the image.
The span: a 3×3 kernel has 3 cells and 2 gaps between them per row. Each gap is (d−1) cells wide. So the total width the spread-out kernel covers is:
keff=k+(k−1)(d−1)
Here keff = effective kernel size: the width of the area the dilated kernel touches (even though it still holds only k×k actual numbers).
Why the topic needs d: in every size formula, dilation quietly replaces the plain k with keff. Once you know keff, dilation needs no new formula — it just makes the kernel effectively bigger.
Why we need it: the kernel can only land on whole cells — you cannot land halfway. If the leftover room does not divide evenly by the stride, the last partial step is simply lost, which is exactly "round down".
Why the mysterious +1: because we count starting from position 0. If the kernel lands at cells 0,2,4, that is 2 jumps but 3 positions. The number of jumps is ⌊room/s⌋; adding 1 counts the starting spot too.
Putting §1–§6 together gives the parent's master formula, now with every symbol earned:
These same foundations power Convolutional Layer Basics, and the output-size reasoning feeds directly into Receptive Field Analysis, Pooling Layers, and — via dilation — Semantic Segmentation Architectures. How wide vs deep you stack these layers is the subject of Network Depth vs Width.