Deep Learning

Image Convolution

A convolutional layer is just a small window of weights sliding over an image, multiplying and summing as it goes. Change the kernel and it detects edges, blurs, or sharpens; change the stride, padding and dilation and you reshape the output itself.

Input
Output

What to observe

  1. The kernel is the whole "neuron": the output is just its weights multiplied against the patch under it, summed. Edge and Sobel fire on brightness changes; Blur averages; Sharpen exaggerates.
  2. Raise the stride and the window jumps in bigger hops, shrinking the output (that is how networks downsample). Padding adds a zero border so the output can keep the input's size.
  3. Increase dilation: the same nine weights spread apart, so the kernel sees a wider area without adding parameters. The output size follows⌊(W + 2p − d(k−1) − 1)/s⌋ + 1.

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