Skip to content

Commit

Permalink
Update clip_score.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rittik9 authored Jan 7, 2025
1 parent 7ab790a commit 4f476a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/torchmetrics/functional/multimodal/clip_score.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4f476a0

Please sign in to comment.