kaira.losses.image.MSSSIMLoss

Inheritance diagram for MSSSIMLoss
- class kaira.losses.image.MSSSIMLoss(kernel_size: int = 11, data_range: float = 1.0)[source]
Bases:
BaseLossMulti-Scale Structural Similarity Index Measure (MS-SSIM) Loss Module.
This module calculates the MS-SSIM loss between the input and the target. MS-SSIM extends SSIM by evaluating similarity at multiple scales, making it more robust to viewing distance variations [Wang et al., 2003].
Methods
Initialize the MSSSIMLoss module.
Forward pass through the MSSSIMLoss module.
- forward(x: Tensor, target: Tensor) Tensor[source]
Forward pass through the MSSSIMLoss module.
- Parameters:
x (torch.Tensor) – The input tensor.
target (torch.Tensor) – The target tensor.
- Returns:
The MS-SSIM loss between the input and the target.
- Return type: