kaira.losses.image.MSELoss

Inheritance diagram of MSELoss

Inheritance diagram for MSELoss

class kaira.losses.image.MSELoss[source]

Bases: BaseLoss

Mean Squared Error (MSE) Loss Module.

This module calculates the MSE loss between the input and the target. MSE is the most widely used loss function for regression tasks and image restoration [Wang and Bovik, 2009].

Methods

__init__

Initialize the MSELoss module.

forward

Forward pass through the MSELoss module.

__init__()[source]

Initialize the MSELoss module.

forward(x: Tensor, target: Tensor) Tensor[source]

Forward pass through the MSELoss module.

Parameters:
Returns:

The MSE loss between the input and the target.

Return type:

torch.Tensor