torch_enhance.metrics¶
-
torch_enhance.metrics.
mae
(y_pred: torch.Tensor, y_true: torch.Tensor) → torch.Tensor[source]¶ Mean absolute error (MAE) metric
Parameters: - y_pred (torch.Tensor) – Super-Resolved image tensor
- y_true (torch.Tensor) – High Resolution image tensor
Returns: Mean absolute error between y_true and y_pred
Return type: torch.Tensor
-
torch_enhance.metrics.
mse
(y_pred: torch.Tensor, y_true: torch.Tensor) → torch.Tensor[source]¶ Mean squared error (MSE) metric
Parameters: - y_pred (torch.Tensor) – Super-Resolved image tensor
- y_true (torch.Tensor) – High Resolution image tensor
Returns: Mean squared error between y_true and y_pred
Return type: torch.Tensor
-
torch_enhance.metrics.
psnr
(y_pred: torch.Tensor, y_true: torch.Tensor) → torch.Tensor[source]¶ Peak-signal-noise ratio (PSNR) metric
Parameters: - y_pred (torch.Tensor) – Super-Resolved image tensor
- y_true (torch.Tensor) – High Resolution image tensor
Returns: Peak-signal-noise-ratio between y_true and y_pred
Return type: torch.Tensor