Closed xiaohu2015 closed 10 months ago
Hi @xiaohu2015. Note that DFN model's weren't trained with a sigmoid loss (like SigLIP). They also don't have a logit bias,. So for computing the probabilities, you want this
logits = model.logit_scale.exp() * image_features @ text_features.T
probs = logits.softmax(dim=-1)
Hi @xiaohu2015. Note that DFN model's weren't trained with a sigmoid loss (like SigLIP). They also don't have a logit bias,. So for computing the probabilities, you want this
logits = model.logit_scale.exp() * image_features @ text_features.T probs = logits.softmax(dim=-1)
thanks
https://huggingface.co/apple/DFN2B-CLIP-ViT-L-14