Comments (1)
@doramasma be careful not to confuse triplet loss with contrastive. Triplet losses require an anchor in addition to postive and negative. Here we just have positive and negative pairings based on the image-text pairs in the dataset. And yes the batching does impact performance quite significantly for various reasons. As long as most of the time the positive pairs are true positives, and the negatives in the batch don't have too many false negatives (I feel this is a bigger confounder than worrying about the case you descripe across batches) there should be enough signal to learn from.
As for what's efficient, there have been loads of papers suggesting alternative forumulations trying to address issues/efficiency with the 'basic' formulation of the loss, making it more sample efficient, doing better with smaller global batch sizes, etc... but simple scales and many of those ideas weren't worth the overhead or just didn't perform at scale.
from open_clip.
Related Issues (20)
- How to initialize the encoder to pretrain CLIP? HOT 1
- Training speed slow HOT 1
- The result is random HOT 2
- Load hybrid-clip in open_clip HOT 1
- CoCa RoBERTa Attention Map Size Issue HOT 1
- Issue with inference values with 'hf-hub:laion/CLIP-convnext_xxlarge-laion2B-s34B-b82K-augreg' HOT 3
- What is the max value for unlocked_groups in TimmModel.lock()? I am trying to fine-tune the entire vision tower HOT 1
- [1,512] Data conversion
- [1,512] data HOT 1
- How to inference trained checkpoint on my own dataset?
- 1111
- Conceptual help on SigLIP + pre-trained CLIP
- Best practice with distributed training? HOT 1
- `coca_ViT-B-32`: `self._encode_text` bug HOT 2
- Coca Image-to-Text, RuntimeError: Boolean value of Tensor with more than one value is ambiguous HOT 4
- Help With Training Bottleneck HOT 1
- fastpath inference is not supported HOT 2
- How do you profile the CLIP models HOT 1
- Huge performance drop in zero-shot image classification for all SigLIP models
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from open_clip.