From 54cea921ec38b94e84806376bd67c01d0999ffe1 Mon Sep 17 00:00:00 2001 From: ztzhu1 Date: Thu, 4 Dec 2025 22:14:49 +0800 Subject: [PATCH] Fix docstring typo of zero_shot_classifier --- clip_benchmark/metrics/zeroshot_classification.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clip_benchmark/metrics/zeroshot_classification.py b/clip_benchmark/metrics/zeroshot_classification.py index 9c70e1e..4b974df 100644 --- a/clip_benchmark/metrics/zeroshot_classification.py +++ b/clip_benchmark/metrics/zeroshot_classification.py @@ -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 = []