Instructions to use mostafasmart/vit-base-patch16-224-2class_normal with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mostafasmart/vit-base-patch16-224-2class_normal with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="mostafasmart/vit-base-patch16-224-2class_normal") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("mostafasmart/vit-base-patch16-224-2class_normal") model = AutoModelForImageClassification.from_pretrained("mostafasmart/vit-base-patch16-224-2class_normal", device_map="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("mostafasmart/vit-base-patch16-224-2class_normal")
model = AutoModelForImageClassification.from_pretrained("mostafasmart/vit-base-patch16-224-2class_normal", device_map="auto")Quick Links
vit-base-patch16-224-2class_normal
This model is a fine-tuned version of google/vit-base-patch16-224 on an unknown dataset. It achieves the following results on the evaluation set:
- Train Loss: 0.0023
- Train Accuracy: 0.9828
- Train Top-3-accuracy: 1.0
- Validation Loss: 0.1087
- Validation Accuracy: 0.9839
- Validation Top-3-accuracy: 1.0
- Epoch: 4
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:
- optimizer: {'name': 'AdamWeightDecay', 'learning_rate': {'module': 'keras.optimizers.schedules', 'class_name': 'PolynomialDecay', 'config': {'initial_learning_rate': 3e-05, 'decay_steps': 170, 'end_learning_rate': 0.0, 'power': 1.0, 'cycle': False, 'name': None}, 'registered_name': None}, 'decay': 0.0, 'beta_1': 0.9, 'beta_2': 0.999, 'epsilon': 1e-08, 'amsgrad': False, 'weight_decay_rate': 0.01}
- training_precision: float32
Training results
| Train Loss | Train Accuracy | Train Top-3-accuracy | Validation Loss | Validation Accuracy | Validation Top-3-accuracy | Epoch |
|---|---|---|---|---|---|---|
| 0.1803 | 0.8483 | 1.0 | 0.0796 | 0.9356 | 1.0 | 0 |
| 0.0129 | 0.9548 | 1.0 | 0.0797 | 0.9663 | 1.0 | 1 |
| 0.0042 | 0.9721 | 1.0 | 0.1078 | 0.9762 | 1.0 | 2 |
| 0.0026 | 0.9791 | 1.0 | 0.1077 | 0.9813 | 1.0 | 3 |
| 0.0023 | 0.9828 | 1.0 | 0.1087 | 0.9839 | 1.0 | 4 |
Framework versions
- Transformers 4.41.2
- TensorFlow 2.15.0
- Datasets 2.20.0
- Tokenizers 0.19.1
- Downloads last month
- 1
Model tree for mostafasmart/vit-base-patch16-224-2class_normal
Base model
google/vit-base-patch16-224
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="mostafasmart/vit-base-patch16-224-2class_normal") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")