Lesson 10.4 · 6 min read · about 45 min to master at a very slow pace
CNN Components and Feature Hierarchies
The role of each part of a CNN (convolutional layers, activations, pooling and fully connected layers) and how stacking them builds features from edges to textures to whole objects.
The parts and their roles
| Component | Role |
|---|---|
| Convolutional layers | Apply learned filters to extract local features into feature maps |
| Activation functions (ReLU) | Add non-linearity after each convolution, so stacked layers don't collapse into one linear map |
| Pooling layers | Shrink the maps, add tolerance to small shifts, cut computation |
| Fully connected layers | Near the output: combine the extracted features into the final prediction (with softmax for classification) |
A typical stack: [convolution → ReLU → pooling] repeated a few times, then flatten, then one or two fully connected layers, then the output.
The feature hierarchy
| Depth | Typical learned features |
|---|---|
| Early layers | Edges, corners, colour blobs |
| Middle layers | Textures, simple shapes, parts (an eye, a wheel) |
| Deep layers | Whole objects and faces |
Each layer combines the features of the layer below, over a larger area of the image. This mirrors how images are actually built (objects from parts, parts from edges), which is why CNNs generalise well on images and why they no longer need hand-crafted features.
Exam-ready summary
"CNNs exploit spatial locality through local connectivity and weight sharing, which cuts parameters dramatically. Stacked convolution, non-linearity and pooling layers learn a hierarchy from edges to parts to objects, and fully connected layers at the end make the prediction."
Stuck? Common doubts
Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.
Going deeperHow does a deep unit "see" a large part of the image if each filter is only 3×3?
Through stacking. A unit in layer 2 sees a 3×3 patch of layer-1 maps, and each of those saw a 3×3 patch of the image, so it depends on a 5×5 region of the image. Pooling enlarges this region further. This region is called the receptive field, and it grows with depth.
Cheatsheet
CNN components
Feature hierarchy
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.