Add README model card
Browse files
README.md
CHANGED
|
@@ -1,10 +1,29 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MNIST Classifier (PyTorch)
|
| 2 |
+
|
| 3 |
+
## What this model does
|
| 4 |
+
This repository contains a simple feed-forward neural network trained to classify MNIST handwritten digits (0–9).
|
| 5 |
+
|
| 6 |
+
## Intended use
|
| 7 |
+
- Educational example for saving, uploading, and reloading a PyTorch model using the Hugging Face Hub.
|
| 8 |
+
- Simple baseline digit classification for MNIST-like inputs.
|
| 9 |
+
|
| 10 |
+
## How to use (inference)
|
| 11 |
+
```python
|
| 12 |
+
import torch
|
| 13 |
+
|
| 14 |
+
loaded = ClassifierHF.from_pretrained("xiaziyna/test_classifier-hf")
|
| 15 |
+
loaded.eval()
|
| 16 |
+
|
| 17 |
+
with torch.no_grad():
|
| 18 |
+
logits = loaded(x)
|
| 19 |
+
preds = torch.argmax(logits, dim=1)
|
| 20 |
+
```
|
| 21 |
+
## Training data
|
| 22 |
+
MNIST handwritten digits loaded via torchvision in the tutorial notebook.
|
| 23 |
+
|
| 24 |
+
## Evaluation
|
| 25 |
+
Test accuracy is printed in the notebook after training and after reloading from the Hub.
|
| 26 |
+
|
| 27 |
+
## Limitations
|
| 28 |
+
- This model is intended for teaching purposes only.
|
| 29 |
+
- Performance depends on using the same preprocessing as training.
|