Downloads · 30 days
406
1% of all-time downloads
dacorvo/mnist-mlp
mnist-mlp is a image classification model from dacorvo. Use it when you need a label for an image. It is set up for transformers. The card lists the license as apache-2.0.
This is a simple MLP trained on the MNIST dataset.
Downloads · 30 days
406
1% of all-time downloads
All-time downloads
27.6K
Public
Parameters
269K
2.2 MB on disk
Likes
1
Public
Click a slice to open those files.
.bin1.1 MB · 50%
From the Hugging Face model README
This is a simple MLP trained on the MNIST dataset.
Its primary use is to be a very simple reference model to test quantization.
The MNIST images must be normalized and flattened as follows:
from torchvision import datasets, transforms
transform=transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,)),
transforms.Lambda(lambda x: torch.flatten(x)),
])
test_set = datasets.MNIST('../data', train=False, download=True,
transform=transform)