LeNet-5 is an early convolutional neural network (CNN) designed by Yann LeCun and colleagues for recognizing handwritten digits, such as those in postal codes. It is an important milestone in deep learning because it showed how a neural network could learn useful image features automatically.
How LeNet-5 processes an image
The classic version takes a 32 × 32 grayscale image as input. The image then passes through a sequence of layers:
- Convolutional layer C1: Applies six 5 × 5 filters to detect simple patterns, such as edges and curves.
- Subsampling layer S2: Reduces the feature maps using average pooling, helping the network use fewer values and retain important information.
- Convolutional layer C3: Uses 16 feature maps to identify more complex patterns. In the original design, connections between maps were selective rather than fully connected.
- Subsampling layer S4: Reduces the feature maps again.
- Convolutional layer C5: Applies 120 filters. With the feature-map dimensions at this point, each result summarizes a large portion of the image.
- Fully connected layer F6: Combines the learned features to help decide which digit is present.
- Output layer: Produces scores for the 10 possible digits, from 0 through 9.
Why the layers matter
Early convolutional layers learn simple visual features. Later layers combine those features into more meaningful shapes, such as loops or strokes. The final layers use those patterns to classify the image.
The original LeNet-5 used tanh-like activation functions and average subsampling. Modern explanations often describe its output with a softmax classifier, although that is not an exact detail of the original design.
Why LeNet-5 is important
- It helped establish convolutional neural networks as an effective approach to image recognition.
- It demonstrated that a network could learn image features instead of relying only on manually designed rules.
- Its ideas—convolutions, pooling, and layered feature learning—remain central to many modern vision models.
In short: LeNet-5 is a pioneering CNN that learns increasingly complex image patterns and uses them to recognize handwritten digits.