LeNet-5 feature-extracting backbone (no classification head).
Builds a LeNet with the paper-cited LeCun 1998 topology:
three convolutions (C1: 1→6, C3: 6→16, C5: 16→120) interleaved with
two sub-sampling layers, using
activations and parameter-free average pooling. Approximately
44 k convolutional parameters (≈60 k including the F6 + output
layers of the classifier variant). Designed for grayscale digit inputs.
Model Size
Parameters
pretrainedbool= False**overridesobject= {}LeNetConfig to
customise individual fields. Use activation="relu" and
pooling="max" for the modern ReLU + max-pool reimplementation,
or in_channels=3 for RGB inputs.Returns
LeNetBackbone with the LeNet-5 configuration applied (or with
overrides merged on top of it).
Notes
See LeCun et al., "Gradient-Based Learning Applied to Document
Recognition", Proc. IEEE 86(11):2278–2324, 1998, Figure 2. The
canonical metric is MNIST test-set error: the original paper reports
0.95% with the full distortion-augmented training recipe. No
paper-cited "tiny / large" LeNet variants exist (H11) — pass
activation/pooling overrides to get the common modernised
flavours.
Examples
>>> import lucid
>>> from lucid.models.vision.lenet import lenet_5
>>> model = lenet_5()
>>> x = lucid.randn(1, 1, 32, 32)
>>> out = model(x)
>>> out.last_hidden_state.shape # (B, 120, 1, 1)
(1, 120, 1, 1)