Convolutions
Sliding a small learnable filter over an image to extract features.
A convolution slides a small window — the filter or kernel — over an image and, at each position, multiplies overlapping values and sums them. The result is a feature map that responds to edges, textures and patterns.
Lecture example: the 4×4 image with rows and the 2×2 kernel . The first output is , and every position gives , so the output is a 3×3 matrix of s.
Variants: standard 2D convolution for images; 1D for time series, audio and text; 3D for video and volumetric medical scans; dilated convolution (gaps between filter elements to enlarge the receptive field, e.g. DeepLab); transposed convolution for learned upsampling in generators and segmentation decoders; grouped convolution (ResNeXt, AlexNet); 1×1 pointwise convolution for channel mixing and bottlenecks; and depthwise separable convolution, one filter per channel followed by a pointwise step.
A Gaussian kernel is a fixed filter for smoothing: . With the centre weight is largest and weights fall off symmetrically, emphasising nearby pixels.
Formula to remember
Perceptron update
Adjust weights only on mistakes.