Key components of a CNN
Convolution, ReLU, pooling, fully connected layers, softmax and the loss.
1. Convolutional layer: learnable filters (e.g. 3×3 or 5×5) slide over the input; each produces a feature map. 2. Activation, typically ReLU, applied element-wise to add non-linearity — negative values become zero.
3. Pooling layer: downsamples feature maps to reduce parameters and computation. 4. Fully connected layers: the feature maps are flattened to a vector and combined to make the final decision.
5. Softmax layer: turns raw scores into class probabilities summing to 1; the highest is the predicted label. 6. Loss function: usually cross-entropy for classification; backpropagation adjusts filter and fully connected weights to minimise it.
Formula to remember
Backpropagation
Errors flow backwards via the chain rule.