From 4f476a09b3e5acbe0156dd2642d9b00c95839b51 Mon Sep 17 00:00:00 2001 From: Rittik Panda Date: Wed, 8 Jan 2025 00:30:36 +0530 Subject: [PATCH] Update clip_score.py --- src/torchmetrics/functional/multimodal/clip_score.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torchmetrics/functional/multimodal/clip_score.py b/src/torchmetrics/functional/multimodal/clip_score.py index 8672d59a899..35845f45caa 100644 --- a/src/torchmetrics/functional/multimodal/clip_score.py +++ b/src/torchmetrics/functional/multimodal/clip_score.py @@ -73,7 +73,7 @@ def _detect_modality(input_data: Union[Tensor, List[Tensor], List[str], str]) -> def _process_image_data(images: Union[Tensor, List[Tensor]]) -> Union[Tensor, List[Tensor]]: """Helper function to process image data.""" - if not isinstance(images, list) and if images.ndim == 3: + if not isinstance(images, list) and images.ndim == 3: images = [images] if not all(i.ndim == 3 for i in images): raise ValueError("Expected all images to be 3d but found image that has either more or less")