Downloads · 30 days
18.5K
12% of all-time downloads
tanganke/clip-vit-base-patch32_dtd
clip-vit-base-patch32_dtd is a feature extraction model from tanganke. Use it when you need embeddings to search or compare text. It is set up for transformers.
- Architecture: ViT-Base with patch size 32 - Training Data: DTD dataset
Downloads · 30 days
18.5K
12% of all-time downloads
All-time downloads
155K
Public
Parameters
87.5M
350 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors350 MB · 100%
From the Hugging Face model README
Adam Optimizer with a constant learning rate 1e-5 for 4000 steps training (batch_size=32). Only the vision encoder is fine-tuned.
load vision model
from transformers import CLIPVisionModel
vision_model = CLIPVisionModel.from_pretrained('tanganke/clip-vit-base-patch32_dtd')
substitute the vision encoder of clip
from transformers import CLIPModel
clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch32")
clip_model.vision_model.load_state_dict(vision_model.vision_model.state_dict())