Convolution Layers

Preserve spatial structure

3 x 32 x 32 image

Convolve the filter with the image

Pasted image 20241201224137.png

Number of filters is a Hyperparameters

Often run on batch of images

Pasted image 20241201225611.png

Stacking Convolutions

Insert non-linear activation function between convolutional layers
Pasted image 20241201230640.png

What do convolutional filters learn?

First-layer conv filters: local image templates

Closer look at spatial dimensions

How many times the filter can fit in the input

Input: W
Filter: K
Output: W - K + 1

Problem: Feature amps “shrink” with each layer!

Receptive Fields

For convolution with kernel size K, each element in the output depends on a K x K receptive field in the input

Each successive convolution adds K - 1 tot he receptive field size
With L layers the receptive field size is 1 + L * (K - 1)
Pasted image 20241201232042.png

For large images we need many layers for each output to “see” the whole image

Downsample inside the network

Strided Convolution

Stride is a Hyperparameters

Tldr

Input: W
Filter: K
Padding: P
Stride: S
Output: (W - K + 2P) / S + 1

Hyperparameters