π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Minor
ananyamukh644bad7ef8b1b
diff --git a/kornia/losses/psnr.py b/kornia/losses/psnr.pyindex 2acd106aa..91aedc66d 100644--- a/kornia/losses/psnr.py+++ b/kornia/losses/psnr.py@@ -43,4 +43,5 @@ def psnr_loss(input: torch.Tensor, target: torch.Tensor, max_val: float) -> torcif input.shape != target.shape:raise TypeError(f"Expected tensors of equal shapes, but got {input.shape} and {target.shape}")mse_val = mse_loss(input, target, reduction='mean')+ max_val = torch.tensor(max_val)return 10 * torch.log10(max_val * max_val / mse_val)