|
60 | 60 | # In the future, this global variable will be replaced with `list(tv_tensors.BoundingBoxFormat)`
|
61 | 61 | # to support all available formats.
|
62 | 62 | SUPPORTED_BOX_FORMATS = [tv_tensors.BoundingBoxFormat[x] for x in ["XYXY", "XYWH", "CXCYWH"]]
|
63 |
| -NEW_BOX_FORMATS = [tv_tensors.BoundingBoxFormat[x] for x in ["XYWHR", "CXCYWHR", "XYXYXYXY"]] # XYXYR |
| 63 | +NEW_BOX_FORMATS = [tv_tensors.BoundingBoxFormat[x] for x in ["XYWHR", "CXCYWHR", "XYXYXYXY"]] |
64 | 64 |
|
65 | 65 | # turns all warnings into errors for this module
|
66 | 66 | pytestmark = [pytest.mark.filterwarnings("error")]
|
@@ -3553,7 +3553,9 @@ def test_kernel_inplace(self, old_format, new_format):
|
3553 | 3553 | input, old_format=old_format, new_format=new_format, inplace=True
|
3554 | 3554 | )
|
3555 | 3555 | if old_format != tv_tensors.BoundingBoxFormat.XYXYXYXY and new_format != tv_tensors.BoundingBoxFormat.XYXYXYXY:
|
3556 |
| - # NOTE: BoundingBox format conversion from and to XYXYXYXY format cannot modify the input tensor inplace as it requires a dimension change. |
| 3556 | + # NOTE: BoundingBox format conversion from and to XYXYXYXY format |
| 3557 | + # cannot modify the input tensor inplace as it requires a dimension |
| 3558 | + # change. |
3557 | 3559 | assert output_inplace.data_ptr() == input.data_ptr()
|
3558 | 3560 | assert output_inplace._version > input_version
|
3559 | 3561 | assert output_inplace is input
|
@@ -3615,10 +3617,7 @@ def test_correctness(self, old_format, new_format, dtype, device, fn_type):
|
3615 | 3617 | actual = fn(bounding_boxes)
|
3616 | 3618 | expected = self._reference_convert_bounding_box_format(bounding_boxes, new_format)
|
3617 | 3619 |
|
3618 |
| - # try: |
3619 | 3620 | assert_equal(actual, expected)
|
3620 |
| - # except: |
3621 |
| - # import pdb; pdb.set_trace() |
3622 | 3621 |
|
3623 | 3622 | def test_errors(self):
|
3624 | 3623 | input_tv_tensor = make_bounding_boxes()
|
|
0 commit comments