Skip to content

Commit

Permalink
test update
Browse files Browse the repository at this point in the history
  • Loading branch information
calcoloergosum committed Aug 27, 2024
1 parent 3c32830 commit 6771c71
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/test_utils/test_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ def test_transforms():
dtype=torch.float32)
pts_torch = rtf.obb2poly(box_torch[None], version='full360')[0]
box2_torch = rtf.poly2obb(pts_torch, version='full360')[0]
torch.testing.assert_close(box_torch, box2_torch, rtol=1e-4, atol=1e-4)
torch.norm(box_torch - box2_torch) < 1e-4

# compatibility
torch.testing.assert_close(
box_torch, torch.from_numpy(box_np), rtol=1e-4, atol=1e-4)
torch.testing.assert_close(
pts_torch, torch.from_numpy(pts_np), rtol=1e-4, atol=1e-4)
# compatibility between numpy and torch implementations
torch.norm(box_torch - torch.from_numpy(box_np)) < 1e-4
torch.norm(pts_torch - torch.from_numpy(pts_np)) < 1e-4

0 comments on commit 6771c71

Please sign in to comment.