π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
add InversePose test
edgarriba375eed5f8073
diff --git a/test/test_pinhole.py b/test/test_pinhole.pyindex 3a402602d..f993cf1f9 100644--- a/test/test_pinhole.py+++ b/test/test_pinhole.py@@ -25,6 +25,10 @@ def test_inverse_pose(batch_size, device_type):eye = torch.matmul(src_pose_dst, dst_pose_src)assert utils.check_equal_torch(eye, torch.eye(4), eps=1e-3)+ # functional+ eye = torch.matmul(tgm.InversePose()(dst_pose_src), dst_pose_src)+ assert utils.check_equal_torch(eye, torch.eye(4), eps=1e-3)+# evaluate function gradientdst_pose_src = utils.tensor_to_gradcheck_var(dst_pose_src) # to varassert gradcheck(tgm.inverse_pose, (dst_pose_src,),@@ -32,8 +36,7 @@ def test_inverse_pose(batch_size, device_type):@pytest.mark.parametrize("device_type", TEST_DEVICES)-# @pytest.mark.parametrize("batch_size", [1, 2, 5, 6])[email protected]("batch_size", [6])[email protected]("batch_size", [1, 2, 5, 6])def test_scale_pinhole(batch_size, device_type):# generate input datadevice = torch.device(device_type)