LeNet is a convolutional neural network for classifying handwritten digits. It maps a centered image to one of ten labels, using convolution, pooling, and nonlinear activation to build increasingly useful visual representations. section 11.1
Its architecture follows a compact sequence of spatial feature extraction and dimensionality reduction:
- Resize each 28 × 28 MNIST image to the 32 × 32 input expected by LeNet. section 11.1
- Apply three convolutional layers with 5 × 5 kernels and stride 1, producing feature maps of 28 × 28, 10 × 10, and 1 × 1 with 6, 16, and 120 channels. section 11.1
- Follow the first two convolutional layers with 2 × 2 average-pooling layers, halving spatial resolution and reducing sensitivity to shifts and distortions. section 11.1
- Use tanh after each feature-map layer to introduce the nonlinearity needed to model nonlinear combinations of inputs. section 11.1
MNIST classifier in PyTorch Lightning
A practical implementation separates data preparation from model logic. An MNISTDataModule resizes images and provides loaders; a LeNetClassifier groups convolution, tanh, and average-pooling operations. A Trainer then fits the model, while prediction runs under torch.no_grad(). section 11.2.4
Figure 11.3 LeNet. (Source: “Gradient-based learning applied to document recognition”; http://mng.bz/Wz0a.)
Use the architecture figure to inspect LeNet’s layer sequence, feature-map sizes, pooling stages, and transition to the flattened representation. section 11.1
LeNet is effective for simple digit recognition but does not provide enough expressive power for complex real-world images. Deeper networks extend the same convolutional idea with more layers and nonlinear transformations. section 11.2 section 11.5


