Пример #1
0
 def test_points2rotation1(self):
     """Test that X points returns R rotations."""
     tol = 1e-5
     skel = Skeleton("TEST")
     rot = skel._points2rotation(X[None, ...])
     result = torch.allclose(R, rot, atol=tol, rtol=tol)
     self.assertTrue(result)
Пример #2
0
 def test_roundtrip2(self):
     """Test that R rotations returns xyz points  that make R rotations."""
     tol = 1e-5
     skel = Skeleton("TEST")
     xyz = skel._rotation2points(R[None, ...])
     _r = skel._points2rotation(xyz)
     result = torch.allclose(R, _r, atol=tol, rtol=tol)
     self.assertTrue(result)
Пример #3
0
 def test_roundtrip(self):
     """Test that X points returns R rotations that make X points."""
     tol = 1e-5
     skel = Skeleton("TEST")
     rot = skel._points2rotation(X[None, ...])
     xyz = skel._rotation2points(rot)
     result = torch.allclose(X, xyz, atol=tol, rtol=tol)
     self.assertTrue(result)