Fine-tune MNIST classifier (workshop demo) at 2026-01-13 15:49 UTC
Browse files- README.md +6 -37
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -1,41 +1,10 @@
|
|
| 1 |
---
|
| 2 |
-
license: mit
|
| 3 |
-
language: en
|
| 4 |
tags:
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
- pytorch
|
| 8 |
-
task_categories:
|
| 9 |
-
- image-classification
|
| 10 |
-
framework: pytorch
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
## Intended use
|
| 19 |
-
- Educational example for saving, uploading, and reloading a PyTorch model using the Hugging Face Hub.
|
| 20 |
-
- Simple baseline digit classification for MNIST-like inputs.
|
| 21 |
-
|
| 22 |
-
## How to use (inference)
|
| 23 |
-
```python
|
| 24 |
-
import torch
|
| 25 |
-
|
| 26 |
-
loaded = ClassifierHF.from_pretrained("foxnat/mnist-classifier-hf")
|
| 27 |
-
loaded.eval()
|
| 28 |
-
|
| 29 |
-
with torch.no_grad():
|
| 30 |
-
logits = loaded(x)
|
| 31 |
-
preds = torch.argmax(logits, dim=1)
|
| 32 |
-
```
|
| 33 |
-
## Training data
|
| 34 |
-
MNIST handwritten digits loaded via torchvision in the tutorial notebook.
|
| 35 |
-
|
| 36 |
-
## Evaluation
|
| 37 |
-
Test accuracy is printed in the notebook after training and after reloading from the Hub.
|
| 38 |
-
|
| 39 |
-
## Limitations
|
| 40 |
-
- This model is intended for teaching purposes only.
|
| 41 |
-
- Performance depends on using the same preprocessing as training.
|
|
|
|
| 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]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2270400
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa7022e39a31e64eec248f108924cfbe9a60e938d7ef83b36b3fbb3df2169ee6
|
| 3 |
size 2270400
|