CoolFace
Modelpublic

apembere/mnist-classifier-hf

sourceHugging Facemitupdated 9mo agoView on Hugging Face
0likes6downloads
Model Card

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)

python
import torch

loaded = ClassifierHF.from_pretrained("apembere/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.