This is a simple implementation of the paper "Gradient-Based Learning Applied to Document Recognition" by LeCun et. al in PyTorch. I have also tried to improve the model using ReLU instead of Tanh and max-pooling instead of average-pooling.
Python3
PyTorch >= 2.0.0
torchvision >= 0.14.0
Average precision on test set: 98%