a828315185a9dc8b21ec8e5dbead9044caf0d3a2,test/geometry/test_conversions.py,TestConvertPointsToHomogeneous,test_gradcheck,#TestConvertPointsToHomogeneous#Any#Any#,418

Before Change


    @pytest.mark.parametrize("batch_shape", [
        (2, 3), (1, 2, 3), (2, 3, 3), (5, 5, 3), ])
    def test_gradcheck(self, device, batch_shape):
        points_h = torch.rand(batch_shape).to(device)

        // evaluate function gradient
        points_h = tensor_to_gradcheck_var(points_h)  // to var
        assert gradcheck(kornia.convert_points_to_homogeneous, (points_h,),

After Change


        assert_allclose(quaternion_log, quaternion_log_hat)

    def test_gradcheck(self, device, dtype):
        quaternion = torch.tensor([0., 0., 1.], device=device, dtype=dtype)
        quaternion = tensor_to_gradcheck_var(quaternion)
        // evaluate function gradient
        assert gradcheck(kornia.quaternion_log_to_exp, (quaternion,),
                         raise_exception=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: TestConvertPointsToHomogeneous
Method Name: test_gradcheck


Project Name: arraiy/torchgeometry
Commit Name: 3d17747ae02c6199db77b93ae44ef79d35b1df36
Time: 2019-11-19
Author: edgar.riba@gmail.com
File Name: test/geometry/test_conversions.py
Class Name: TestConvertPointsFromHomogeneous
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: TestConvertPointsFromHomogeneous
Method Name: test_gradcheck