File size: 1,044 Bytes
a64a99b
 
 
 
 
 
 
 
 
 
 
 
62dd99a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
license: mit
language: en
tags:
  - tutorial
  - mnist
  - pytorch
task_categories:
  - image-classification
framework: pytorch
---

# 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("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.