Instructions to use abifitrabiandi/vit-snack-classification-fp16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use abifitrabiandi/vit-snack-classification-fp16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="abifitrabiandi/vit-snack-classification-fp16") 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("abifitrabiandi/vit-snack-classification-fp16") model = AutoModelForImageClassification.from_pretrained("abifitrabiandi/vit-snack-classification-fp16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
vit-snack-classification-fp16
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 0.2821
- Accuracy: 0.9445
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.5962 | 0.33 | 100 | 0.4781 | 0.9497 |
| 0.4348 | 0.66 | 200 | 0.3871 | 0.9466 |
| 0.3349 | 0.99 | 300 | 0.3750 | 0.9309 |
| 0.2495 | 1.32 | 400 | 0.2920 | 0.9476 |
| 0.2331 | 1.65 | 500 | 0.2821 | 0.9445 |
| 0.3387 | 1.98 | 600 | 0.2597 | 0.9476 |
| 0.3133 | 2.31 | 700 | 0.2536 | 0.9487 |
| 0.2615 | 2.64 | 800 | 0.2393 | 0.9529 |
| 0.2687 | 2.97 | 900 | 0.2392 | 0.9550 |
Framework versions
- Transformers 4.37.2
- Pytorch 2.1.0+cu121
- Datasets 2.17.1
- Tokenizers 0.15.2
- Downloads last month
- 5
Model tree for abifitrabiandi/vit-snack-classification-fp16
Base model
google/vit-base-patch16-224-in21k