Skip to content

Commit

Permalink
Fix return type of piq.ssim
Browse files Browse the repository at this point in the history
This function can return a single tensor if the parameter `full` is set to `False` (the default).
  • Loading branch information
adamtheturtle committed Feb 4, 2024
1 parent 9948a52 commit 3b69661
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piq/ssim.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

def ssim(x: torch.Tensor, y: torch.Tensor, kernel_size: int = 11, kernel_sigma: float = 1.5,
data_range: Union[int, float] = 1., reduction: str = 'mean', full: bool = False,
downsample: bool = True, k1: float = 0.01, k2: float = 0.03) -> List[torch.Tensor]:
downsample: bool = True, k1: float = 0.01, k2: float = 0.03) -> List[torch.Tensor] | torch.Tensor:
r"""Interface of Structural Similarity (SSIM) index.
Inputs supposed to be in range ``[0, data_range]``.
To match performance with skimage and tensorflow set ``'downsample' = True``.
Expand Down

0 comments on commit 3b69661

Please # to comment.