Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clip_benchmark/metrics/zeroshot_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def zero_shot_classifier(model, tokenizer, classnames, templates, device, amp=Tr
Returns
-------

torch.Tensor of shape (N,C) where N is the number
of templates, and C is the number of classes.
torch.Tensor of shape (D,C) where D is the projection
dimension, and C is the number of classes.
"""
with torch.no_grad(), torch.autocast(device, enabled=amp):
zeroshot_weights = []
Expand Down