π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
test(filters): run the MotionBlur and MotionBlur3D dynamo tests again (#5576)
εΊζ’η168ad1bc4010
diff --git a/tests/filters/test_motion.py b/tests/filters/test_motion.pyindex f4a6e68c4..4edfc8169 100644--- a/tests/filters/test_motion.py+++ b/tests/filters/test_motion.py@@ -308,11 +308,10 @@ class TestMotionBlur(BaseTester):# the shared default is "reflect"self.assert_close(from_function, motion_blur(image, *params, border_type="reflect"))- @pytest.mark.skip(reason="After the op be optimized the results are not the same")@pytest.mark.parametrize("batch_size", [1, 2])def test_dynamo(self, batch_size, device, dtype, torch_optimizer):- # TODO: FIX op- data = torch.ones(batch_size, 3, 10, 10, device=device, dtype=dtype)+ # Not a constant image: any normalised kernel blurs one to itself, so it cannot tell the kernels apart+ data = torch.rand(batch_size, 3, 10, 10, device=device, dtype=dtype)op = MotionBlur(3, 36.0, 0.5)op_optimized = torch_optimizer(op)@@ -532,11 +531,11 @@ class TestMotionBlur3D(BaseTester):self.assert_close(actual, expected, rtol=0, atol=0)self.assert_close(MotionBlur3D(3, *params)(volume), expected, rtol=0, atol=0)- @pytest.mark.skip(reason="After the op be optimized the results are not the same")@pytest.mark.parametrize("batch_size", [1, 2])def test_dynamo(self, batch_size, device, dtype, torch_optimizer):- # TODO: Fix the operation to works after dynamo optimize- data = torch.ones(batch_size, 3, 1, 10, 10, device=device, dtype=dtype)+ # Not a constant volume, for the reason in the 2-D test, and more than one slice deep: with the replicate+ # border every depth tap of a D = 1 volume reads the same slice+ data = torch.rand(batch_size, 3, 4, 10, 10, device=device, dtype=dtype)op = MotionBlur3D(3, (0.0, 360.0, 150.0), 0.5)op_optimized = torch_optimizer(op)