We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2df5d36 commit 9ae8f8dCopy full SHA for 9ae8f8d
ft-D-eval-model-on-my-finetune-dataset.py
@@ -88,7 +88,7 @@ def evaluate_model(model, data_loader):
88
text_embeddings = F.normalize(text_embeddings, p=2, dim=1)
89
90
# Compute cosine similarity with temperature scaling
91
- logits_per_image = torch.matmul(image_embeddings, text_embeddings.T) / model.logit_scale.exp()
+ logits_per_image = torch.matmul(image_embeddings, text_embeddings.T) * model.logit_scale.exp()
92
93
_, top_indices = logits_per_image.topk(1, dim=-1)
94
0 commit comments