6a4fa82792bddc6126eaf944956f49f0a0cb7ca7,test/filters/test_sobel.py,TestSpatialGradient3d,test_jit,#TestSpatialGradient3d#,240

Before Change


        @torch.jit.script
        def op_script(input):
            return kornia.filters.spatial_gradient(input)
        img = torch.rand(2, 3, 4, 5).to(device)
        actual = op_script(img)
        expected = kornia.filters.spatial_gradient(img)
        assert_allclose(actual, expected)

After Change



    @pytest.mark.skip("issue with device in kernel generation")
    def test_jit(self, device, dtype):
        img = torch.rand(2, 3, 1, 4, 5, device=device, dtype=dtype)
        op = kornia.filters.spatial_gradient3d
        op_script = torch.jit.script(op)
        expected = op(img)
        actual = op_script(img)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: arraiy/torchgeometry
Commit Name: 6a4fa82792bddc6126eaf944956f49f0a0cb7ca7
Time: 2020-12-22
Author: edgar.riba@gmail.com
File Name: test/filters/test_sobel.py
Class Name: TestSpatialGradient3d
Method Name: test_jit


Project Name: arraiy/torchgeometry
Commit Name: 6a4fa82792bddc6126eaf944956f49f0a0cb7ca7
Time: 2020-12-22
Author: edgar.riba@gmail.com
File Name: test/filters/test_sobel.py
Class Name: TestSpatialGradient3d
Method Name: test_gradcheck


Project Name: arraiy/torchgeometry
Commit Name: 7634391b070859dc1c11b092fde754dbc7911d4a
Time: 2021-01-12
Author: edgar.riba@gmail.com
File Name: test/test_losses.py
Class Name: TestDepthSmoothnessLoss
Method Name: test_gradcheck