a828315185a9dc8b21ec8e5dbead9044caf0d3a2,test/geometry/test_conversions.py,TestQuaternionExpToLog,test_smoke_batch,#TestQuaternionExpToLog#Any#Any#,245

Before Change



    @pytest.mark.parametrize("batch_size", (1, 3, 8))
    def test_smoke_batch(self, device, batch_size):
        quaternion_exp = torch.zeros(batch_size, 4).to(device)
        quaternion_log = kornia.quaternion_exp_to_log(quaternion_exp)
        assert quaternion_log.shape == (batch_size, 3)

    def test_unit_quaternion(self, device):

After Change


    def test_jit(self, device, dtype):
        @torch.jit.script
        def op_script(input):
            return kornia.quaternion_to_rotation_matrix(input)

        quaternion = torch.tensor([0., 0., 1., 0.], device=device, dtype=dtype)
        actual = op_script(quaternion)
        expected = kornia.quaternion_to_rotation_matrix(quaternion)
        assert_allclose(actual, expected, atol=1e-4, rtol=1e-4)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 3

Instances


Project Name: arraiy/torchgeometry
Commit Name: a828315185a9dc8b21ec8e5dbead9044caf0d3a2
Time: 2020-12-22
Author: sj8716643@126.com
File Name: test/geometry/test_conversions.py
Class Name: TestQuaternionExpToLog
Method Name: test_smoke_batch


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_smoke


Project Name: arraiy/torchgeometry
Commit Name: 5c9356d3dbcd44c3cd7f833651a3b542250c2699
Time: 2020-11-30
Author: edgar.riba@gmail.com
File Name: test/enhance/test_core.py
Class Name: TestAddWeighted
Method Name: test_gradcheck


Project Name: arraiy/torchgeometry
Commit Name: a828315185a9dc8b21ec8e5dbead9044caf0d3a2
Time: 2020-12-22
Author: sj8716643@126.com
File Name: test/geometry/test_conversions.py
Class Name: TestQuaternionToRotationMatrix
Method Name: test_smoke_batch


Project Name: arraiy/torchgeometry
Commit Name: a828315185a9dc8b21ec8e5dbead9044caf0d3a2
Time: 2020-12-22
Author: sj8716643@126.com
File Name: test/geometry/warp/test_homography_warper.py
Class Name: TestHomographyWarper
Method Name: test_gradcheck