kaira.losses.image.CombinedLoss

Inheritance diagram for CombinedLoss
- class kaira.losses.image.CombinedLoss(losses: Sequence[BaseLoss], weights: list[float])[source]
Bases:
BaseLossCombined Loss Module.
This module combines multiple loss functions into a single loss function. Combining multiple losses is a common approach to improve image quality by addressing different aspects of visual perception [Zhao et al., 2016].
Methods
Initialize the CombinedLoss module.
Forward pass through the CombinedLoss module.
- __init__(losses: Sequence[BaseLoss], weights: list[float])[source]
Initialize the CombinedLoss module.
- forward(x: Tensor, target: Tensor) Tensor[source]
Forward pass through the CombinedLoss module.
- Parameters:
x (torch.Tensor) – The input tensor.
target (torch.Tensor) – The target tensor.
- Returns:
The combined loss between the input and the target.
- Return type: