A convolution slides a given kernel across an exact integer image. This lesson fixes the visible image, kernel, padding, and stride before any output value appears.

highlighted = computed this step

The image and the kernel

A convolution starts with a grid of input values and a smaller kernel. Here the image is 4 by 4, and the kernel is 3 by 3. Every entry is a pinned integer, so the source values are visible before any sum is made.

image 4×4,kernel 3×3\text{image }4\times4,\quad \text{kernel }3\times3
Convolution setupExact integer image and given integer kernel.input imagec1c2c3c43000300330030003given kernelc1c2c310-110-110-1kernel is given; valid padding and stride one; one exact forward pass; head softmax is NAMED;NOT training; NOT learning

Valid padding and stride

The policy is valid padding and stride 1. That means the kernel only lands where the whole patch is inside the image. No hidden border values are invented.

valid padding,stride 1\text{valid padding},\quad \text{stride }1
Convolution setupExact integer image and given integer kernel.input imagec1c2c3c43000300330030003given kernelc1c2c310-110-110-1kernel is given; valid padding and stride one; one exact forward pass; head softmax is NAMED;NOT training; NOT learning

Summary

This setup fixes the exact data for the whole book. The kernel is given as part of the forward pass, not fitted inside this surface.

given integer kernel; exact integer image\text{given integer kernel; exact integer image}
Convolution setupExact integer image and given integer kernel.input imagec1c2c3c43000300330030003given kernelc1c2c310-110-110-1kernel is given; valid padding and stride one; one exact forward pass; head softmax is NAMED;NOT training; NOT learning