-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Use torch.testing.assert_close in test_ops.py #3883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -860,20 +865,11 @@ def test_bbox_same(self): | |||
exp_xyxy = torch.tensor([[0, 0, 100, 100], [0, 0, 0, 0], | |||
[10, 15, 30, 35], [23, 35, 93, 95]], dtype=torch.float) | |||
|
|||
box_same = ops.box_convert(box_tensor, in_fmt="xyxy", out_fmt="xyxy") | |||
self.assertEqual(exp_xyxy.size(), torch.Size([4, 4])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we shoudn't remove self.assertEqual(exp_xyxy.size(), torch.Size([4, 4]))
as it's not the same as comparing exp_xyxy.size()
vs box_tensor.size()
, so I'll put these back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stamping
Summary: Co-authored-by: Philip Meier <[email protected]> Reviewed By: vincentqb, cpuhrsch Differential Revision: D28679978 fbshipit-source-id: 1699926c8d738e904603e40f87b6b3087d3d37bd
part of #3865