Deep Learning

Convolution

A window of weights slides over a grid and each position gives one number. Padding, stride and dilation decide how many positions there are, and with several channels every filter reads all of them at once and sums the slices.

where the window iswhat it has already readpositive outputnegative outputpaddingnever read

Run to walk the window across · click an output cell to jump the window there

—
—

Numbers
input—
padded to—
window covers—
output—
multiplications—
window at—

What to observe

  1. With no padding the window must stay inside, so the output shrinks byk − 1. Padding of (k − 1)/2 gives it back, which is why odd kernels are the norm.
  2. A stride of 2 roughly halves the output. When it does not divide evenly the last hop is dropped, and the red row and column are never read at all.
  3. Dilation spreads the same k² weights over d(k − 1) + 1 cells: more reach at the same cost, the subject ofReceptive Field.
  4. In Channels each filter has one k × k slice per input channel, the slices' sums are added into one number, and each filter makes one output channel. At k = 1 it only mixes channels. What particular weights do to a picture is Image Filters.

Shortcuts:space run/pause · s step · r reset · f fullscreen