kaira.losses.image.MSELPIPSLoss

Inheritance diagram for MSELPIPSLoss
- class kaira.losses.image.MSELPIPSLoss(mse_weight=1.0, lpips_weight=1.0)[source]
Bases:
BaseLossMSELPIPSLoss Module.
This module combines MSE and LPIPS losses with configurable weights. This combination balances pixel-wise accuracy (MSE) with perceptual quality (LPIPS) [Zhang et al., 2018].
Methods
Initialize the MSELPIPSLoss module.
Forward pass through the MSELPIPSLoss module.
- forward(x: Tensor, target: Tensor) Tensor[source]
Forward pass through the MSELPIPSLoss module.
- Parameters:
x (torch.Tensor) – The input tensor.
target (torch.Tensor) – The target tensor.
- Returns:
The combined MSE and LPIPS loss between the input and target.
- Return type: