liveBook · Manning

LeNet

As explained in Math and Architectures of Deep Learning

A convolutional neural network architecture introduced for digit recognition and used here as the example image classifier.

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

How Math and Architectures of Deep Learning covers it

How deep it goes
Explains layer dimensions, pooling, nonlinear activation, and implementation, but stops short of detailed optimization internals.
Examples
Uses MNIST digit images, LeNet layer dimensions, PyTorch Lightning modules, training, and inference as concrete examples.
What it assumes
Assumes familiarity with neural networks while revisiting convolution, pooling, and activation concepts through the MNIST task.
What you can do after
Build and train a LeNet digit classifier with PyTorch Lightning, then run inference on a test batch.
How it connects
Connects convolutional layers with pooling, tanh activation, MNIST, PyTorch, and deeper neural networks.

Also explained in

Compare how 3 books explain LeNet →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Math and Architectures of Deep Learning. The section links point to the parts of the book it draws on.