MNIST Classifier (PyTorch)
What this model does
This repository contains a simple feed-forward neural network trained to classify MNIST handwritten digits (0–9).
Intended use
- Educational example for saving, uploading, and reloading a PyTorch model using the Hugging Face Hub.
- Simple baseline digit classification for MNIST-like inputs.
How to use (inference)
import torch
loaded = ClassifierHF.from_pretrained("foxnat/mnist-classifier-hf")
loaded.eval()
with torch.no_grad():
logits = loaded(x)
preds = torch.argmax(logits, dim=1)
Training data
MNIST handwritten digits loaded via torchvision in the tutorial notebook.
Evaluation
Test accuracy is printed in the notebook after training and after reloading from the Hub.
Limitations
- This model is intended for teaching purposes only.
- Performance depends on using the same preprocessing as training.
- Downloads last month
- 91
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support