Skip to content
AI360Xpert
Beta
Core ML

Visual explainer

Convolution Operation

How one small kernel slides over an image and writes a feature map, with every number shown.

A dense layer wires each pixel to its own weight, so a shift of two lands on stranger weights.
A dense layer wires each pixel to its own weight, so a shift of two lands on stranger weights.

Wire every pixel to its own weight and an edge at the left is learned on wires A, B and C. Slide that edge two pixels right onto wires D, E and F, which never trained. Your detector goes blind.

Nine Weights, One Job

Nine shared weights in a 3 by 3 kernel hunt one local pattern everywhere.
Nine shared weights in a 3 by 3 kernel hunt one local pattern everywhere.

Shrink the job to nine numbers: keep the left column, skip the middle, subtract the right. A big answer means a vertical edge sits under the window. Those nine weights are the whole detector you will reuse.

Multiply, Add, One

Left column sums to 4 and right column sums to 3, so this stop outputs 1.
Left column sums to 4 and right column sums to 3, so this stop outputs 1.

Lay the kernel on the top-left patch and multiply each pair. The left column totals 4, the right totals 3, the middle is skipped, so 4 minus 3 gives 1. That single number is one cell of your new map.

Nine Stops, Nine Answers

Nine stops over a 5 by 5 input fill a 3 by 3 feature map reading 1, 2, -1 down the first row.
Nine stops over a 5 by 5 input fill a 3 by 3 feature map reading 1, 2, -1 down the first row.

Slide the window across all nine stops with stride 1 and no padding. Five minus three plus one gives three stops per side, so nine answers fill the map. The cell you just computed sits top-left, circled.

Found It Twice

The same kernel answers 1 at the top left and 1 at the bottom right, finding the edge twice.
The same kernel answers 1 at the top left and 1 at the bottom right, finding the edge twice.

Here is the payoff for sharing. The identical nine weights answer 1 at the top-left edge and 1 again where the edge reappears. Position changed, response did not. That is translation tolerance earned, not claimed.

Shrink Or Preserve

Stride 1 gives 3 by 3, stride 2 gives 2 by 2, and padding 1 keeps all 5 by 5.
Stride 1 gives 3 by 3, stride 2 gives 2 by 2, and padding 1 keeps all 5 by 5.

Stride 2 skips stops and shrinks output to 2 by 2, saving compute. Padding 1 rings the input with zeros and preserves the full 5 by 5. You pick shrinking for speed and padding when every pixel must survive.

Where It Breaks

A 3 by 3 window sees a curve but cannot tell a circle from an S.
A 3 by 3 window sees a curve but cannot tell a circle from an S.

Nine pixels cannot hold global shape. One curve bit could belong to a circle or an S, and the window guesses either way. Only deeper layers, pooling many such bits, resolve the owner.

The Quick Version

  • Dense wires go blind after a two-pixel shift.
  • Nine weights hunt one edge: left minus right.
  • First stop reads 4 minus 3 equals 1.
  • Nine stops fill a 3 by 3 map.
  • Same kernel answers 1 in two places.
  • Stride shrinks output; padding preserves size.
  • Nine pixels cannot name the whole shape.