foxnat commited on
Commit
62dd99a
·
verified ·
1 Parent(s): 5796e4e

Add README model card

Browse files
Files changed (1) hide show
  1. README.md +29 -10
README.md CHANGED
@@ -1,10 +1,29 @@
1
- ---
2
- tags:
3
- - model_hub_mixin
4
- - pytorch_model_hub_mixin
5
- ---
6
-
7
- This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration:
8
- - Code: [More Information Needed]
9
- - Paper: [More Information Needed]
10
- - Docs: [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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("foxnat/mnist-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.