SSIM
SSIM ¶
Bases: Module
forward ¶
Compute the SSIM loss.
Parameters yhat (torch.Tensor): The prediction map. Shape (B, C, H, W). target (torch.Tensor): the ground truth annotations. Shape (B, H, W). target_weight (torch.Tensor, default=None): The edge weight map. Shape (B, H, W).
Returns:
| Type | Description |
|---|---|
Tensor
|
torch.Tensor: Computed SSIM loss (scalar). |