π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
fix tensor for testing
Pulkit Khandelwal0fa76b4abbc9
diff --git a/test/test_image.py b/test/test_image.pyindex 54669555a..70472eccb 100644--- a/test/test_image.py+++ b/test/test_image.py@@ -1,7 +1,6 @@import pytestimport torch-import mathimport torchgeometry.image as imagefrom torch.autograd import gradcheckfrom torch.testing import assert_allclose@@ -64,11 +63,11 @@ def test_get_laplacian_kernel2d(window_size):kernel = image.get_laplacian_kernel2d(window_size)assert kernel.shape == (window_size, window_size)assert kernel.sum().item() == pytest.approx(0.0)- expected = torch.tensor([1., 1., 1., 1., 1.],+ expected = torch.tensor([[1., 1., 1., 1., 1.],[1., 1., 1., 1., 1.],[1., 1., -24., 1., 1.],[1., 1., 1., 1., 1.],- [1., 1., 1., 1., 1.])+ [1., 1., 1., 1., 1.]])assert_allclose(expected, kernel)