0234315776751221ef9da5d2073e32f9f54c01bb,test/color/test_gray.py,TestRgbToGrayscale,test_jit,#TestRgbToGrayscale#Any#Any#,60

Before Change


        assert gradcheck(kornia.rgb_to_grayscale, (img,), raise_exception=True)

    def test_jit(self, device, dtype):
        if "cuda" in str(device):
            pytest.skip("skip this test for a while")
        batch_size, channels, height, width = 2, 3, 64, 64
        img = torch.ones(batch_size, channels, height, width).to(device, dtype)
        op = kornia.rgb_to_grayscale
        op_jit = kornia.jit.rgb_to_grayscale

After Change



    @pytest.mark.jit
    def test_jit(self, device, dtype):
        B, C, H, W = 2, 3, 4, 4
        img = torch.ones(B, C, H, W, device=device, dtype=dtype)
        op = kornia.rgb_to_grayscale
        op_jit = kornia.jit.rgb_to_grayscale
        assert_allclose(op(img), op_jit(img))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: arraiy/torchgeometry
Commit Name: 0234315776751221ef9da5d2073e32f9f54c01bb
Time: 2020-11-01
Author: edgar.riba@gmail.com
File Name: test/color/test_gray.py
Class Name: TestRgbToGrayscale
Method Name: test_jit


Project Name: hyperspy/hyperspy
Commit Name: fb59435ae8d3603ffc71e8b4eb17b4cec496cddf
Time: 2018-07-03
Author: frandelapena@gmail.com
File Name: hyperspy/tests/signal/test_tools.py
Class Name: Test3D
Method Name: test_rebin


Project Name: apache/incubator-tvm
Commit Name: c94623ad0dac5fa5ce7a9a3c4ecb794351ebc610
Time: 2020-10-29
Author: anshuman.t@huawei.com
File Name: tests/python/frontend/tflite/test_forward.py
Class Name:
Method Name: _test_relu