Instructions to use tzhao3/vit-MNIST with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tzhao3/vit-MNIST with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="tzhao3/vit-MNIST") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("tzhao3/vit-MNIST") model = AutoModelForImageClassification.from_pretrained("tzhao3/vit-MNIST", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download trainer_state.json from tzhao3/vit-MNIST: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/tzhao3/vit-MNIST/resolve/main/trainer_state.json
- Command line
-
hf download hf://tzhao3/vit-MNIST/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/tzhao3/vit-MNIST/resolve/main/trainer_state.json
642 Bytes
| { | |
| "best_metric": 0.9911666666666666, | |
| "best_model_checkpoint": "fine-tune-vit-mnist\\checkpoint-211", | |
| "epoch": 1.0, | |
| "global_step": 211, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 1.0, | |
| "eval_accuracy": 0.9911666666666666, | |
| "eval_loss": 0.09094277024269104, | |
| "eval_runtime": 24.8266, | |
| "eval_samples_per_second": 241.676, | |
| "eval_steps_per_second": 0.967, | |
| "step": 211 | |
| } | |
| ], | |
| "max_steps": 211, | |
| "num_train_epochs": 1, | |
| "total_flos": 4.184867478822912e+18, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |