π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
Add comments to test
ananyamukh65d1cae3232cc
diff --git a/test/test_losses.py b/test/test_losses.pyindex 2748af938..2f8614f48 100644--- a/test/test_losses.py+++ b/test/test_losses.py@@ -362,11 +362,15 @@ class TestPSNR:assert pytest.approx(loss.item(), float('inf'))def test_type(self):+ # Expecting an exception+ # since we pass integers instead of torch tensorscriterion = kornia.losses.PSNR(1.0)with pytest.raises(Exception) as e:criterion(1, 2)def test_shape(self):+ # Expecting an exception+ # since we pass tensors of different shapescriterion = kornia.losses.PSNR(1.0)with pytest.raises(Exception) as e:criterion(torch.rand(2, 3, 3, 2), torch.rand(2, 3, 3))