microsoft/cats_vs_dogs
Viewer • Updated • 23.4k • 3.53k • 66
How to use nateraw/vit-base-cats-vs-dogs with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="nateraw/vit-base-cats-vs-dogs")
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("nateraw/vit-base-cats-vs-dogs")
model = AutoModelForImageClassification.from_pretrained("nateraw/vit-base-cats-vs-dogs", device_map="auto")This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the cats_vs_dogs dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.064 | 1.0 | 311 | 0.0483 | 0.9849 |
| 0.0622 | 2.0 | 622 | 0.0275 | 0.9903 |
| 0.0366 | 3.0 | 933 | 0.0262 | 0.9917 |
| 0.0294 | 4.0 | 1244 | 0.0219 | 0.9932 |
| 0.0161 | 5.0 | 1555 | 0.0202 | 0.9935 |