5.6.11 · D1Machine Learning (Aerospace Applications)

Foundations — Convolutional neural networks — convolution operation, pooling

1,924 words9 min readBack to topic

Before you can read the parent note, you must be able to look at a symbol like and see a picture, not a wall of Greek. This page builds every piece from nothing. Read top to bottom — each idea uses only the ones above it.


1. An image is a grid of numbers

Look at the figure. On the left is what your eye sees; on the right is the exact same thing as a grid the computer stores.

Figure — Convolutional neural networks — convolution operation, pooling
  • The picture: a table with rows and columns of numbers.
  • Why the topic needs it: convolution is arithmetic on this grid. If you can't picture the image as numbers-in-boxes, none of the formulas mean anything.

2. Indexing: — naming one box

We count rows and columns starting from (this is the coding convention). So is the top-left box.

Why the topic needs it: the convolution formula is written entirely in terms of . That is just "start at box and step boxes down, boxes right." Nothing more mysterious than reading a spreadsheet cell.


3. The kernel — a tiny pattern-stamp

Think of it as a tiny transparent stamp with numbers printed on it. Positive numbers mean "I want brightness here"; negative numbers mean "I want darkness here." When you lay the stamp on the image and the bright/dark pattern matches, the stamp "fires."

Figure — Convolutional neural networks — convolution operation, pooling
  • The picture: a small stamp hovering above one window of the big grid.
  • Why the topic needs it: the whole CNN idea is one small stamp reused everywhere. The kernel is that stamp. The parent's "weight sharing" just means the same numbers are used at every position.

4. Multiply-and-add: what (sigma) means

Before the convolution sum, you need to read .

A double sum is just two nested loops: for every row-step , for every column-step . It sweeps over every box of the small kernel.


5. Putting it together: the convolution sum, seen

Now the parent's formula reads like plain English:

Say it aloud: "Slide the stamp so its top-left corner sits at box . For every box in the stamp , multiply the image number underneath, , by the stamp number . Add them all up. Add the bias . That total is one output number ."

Figure — Convolutional neural networks — convolution operation, pooling
  • The picture: the stamp on one window; each pair of numbers gets multiplied; arrows funnel into one output box.
  • is the output feature map — a new grid holding one match-score per position.
  • Why the topic needs it: this is the convolution operation. Everything else (pooling, sizing) decorates this core step.

6. The bias

Picture: after funneling the multiply-add into , you nudge the result by a fixed amount . One per stamp.


7. Sliding controls: stride and padding

Figure — Convolutional neural networks — convolution operation, pooling
  • The picture: the same grid with a stride-1 (dense) sweep vs stride-2 (skipping) sweep, and a zero border showing padding.
  • Why the topic needs them: they appear in the sizing formula . See Padding and stride for the full treatment; here you just need the pictures.

8. The floor brackets

Why the topic needs it: you can't slide a stamp a fractional number of steps, so the count of positions must be a whole number — you throw away any leftover. That's the floor.


9. max and average — the pooling summaries

Average is the same but "add them all and divide by how many" instead of "biggest." Pooling replaces each window of by one such summary. No new stamp, no multiplying — just look and summarise.

Why the topic needs it: pooling shrinks the feature map and makes the network stop caring about a feature's exact position (see Translation equivariance vs invariance).


10. Channels and filter count

Picture: a deck of stamps, each producing one output sheet; the output is a thick stack of sheets. This connects forward to Feature maps and receptive fields.


How these foundations feed the topic

Image as number grid

Index I of i j

Kernel K small stamp

Sum symbol sigma

Multiply and add

Convolution output S

Bias b

Stride s and padding p

Output size formula

Floor brackets

max and average

Pooling

Channels C and filters F

Parameter count

Convolution and pooling topic 5.6.11

Every arrow says "you need the left box to understand the right box." The parent topic sits at the bottom — reachable only after all the foundations are in place. If you jumped straight there, you'd hit an undefined symbol; this map shows exactly what to build first.


Equipment checklist

Test yourself — cover the right side and answer before revealing.

What does mean, and which index goes down?
The number in the grid box at row , column ; the first index () goes down (rows).
What is a kernel in plain words?
A small grid of numbers — a reusable "pattern stamp" slid over the image; is its width.
Read out loud and give its value.
"Add for " .
In the convolution sum, what does one output number represent?
The match-score of the stamp at that position: multiply each image number by the matching stamp number, add them all, plus bias .
What does the bias do?
Adds one fixed number to every output, shifting the whole match-score up or down.
What does stride do to the sweep?
Jumps two boxes each slide, skipping positions, so the output is about half as wide.
What is padding for?
Adds a border of rings of zeros so the stamp reaches the edges and the output shrinks less.
Evaluate and say why floor appears in the size formula.
; you can't take a fractional number of slide-steps, so you round the count down.
What does over a window return?
The single largest number in that window (used by max-pooling).
If a layer has filters, each , how many learnable numbers?
— the is one bias per filter; independent of image size.

Connections

  • Hinglish version of the parent
  • Fully-connected neural networks — the layer convolution is a constrained version of
  • Padding and stride — full story of and
  • Feature maps and receptive fields — what the stacked outputs become
  • Translation equivariance vs invariance — why sliding + pooling matters
  • Backpropagation — how the stamp numbers get learned
  • Image classification for aerospace inspection — where all this is used