LeNet-5 Tutorial
Introduction
Overview of LeNet: click here
Activation Function: TanH
Pooling: Avg. pooling
No Padding
F.C: softmax
Originally used RBF(Radial Basis Function)
Loss Function: MSE
Input: 32x32x1
MNIST image is 28x28. MNIST is padded to 32

LeNet-5 layers:
Convolution #1. Input = 32x32x1. Output = 28x28x6
conv2d
SubSampling #1. Input = 28x28x6. Output = 14x14x6. SubSampling is simply Average Pooling so we use
avg_pool
Convolution #2. Input = 14x14x6. Output = 10x10x16
conv2d
SubSampling #2. Input = 10x10x16. Output = 5x5x16
avg_pool
Fully Connected #1. Input = 5x5x16. Output = 120
Fully Connected #2. Input = 120. Output = 84
Output 10
Keras
Another code example: click here
PyTorch
Originally CONV 5x5. Some code use CONV 3x3
Last updated
Was this helpful?