Skip to content

Commit 4a02ba0

Browse files
Simplify elastic test
1 parent aac8e1e commit 4a02ba0

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

test/test_transforms_v2.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,16 +2827,6 @@ def test_kernel_image(self, param, value, dtype, device):
28272827
@pytest.mark.parametrize("device", cpu_and_cuda())
28282828
def test_kernel_bounding_boxes(self, format, dtype, device):
28292829
bounding_boxes = make_bounding_boxes(format=format, dtype=dtype, device=device)
2830-
if tv_tensors.is_rotated_bounding_format(format):
2831-
# generated test rotated boxes can be out of the canvas size
2832-
# but elastic transformation expect the boxes to be clamped
2833-
# Also by convention the integer boxes should be allowed to
2834-
# reach width and height. But the grid for the elastic transform
2835-
# only covers up to width - 1 and height -1. So we are tricking the
2836-
# test by making sure we are clamping the boxes up to width - 1 and height -1.
2837-
bounding_boxes.canvas_size = (bounding_boxes.canvas_size[0] - 1, bounding_boxes.canvas_size[1] - 1)
2838-
bounding_boxes = F.clamp_bounding_boxes(bounding_boxes)
2839-
bounding_boxes.canvas_size = (bounding_boxes.canvas_size[0] + 1, bounding_boxes.canvas_size[1] + 1)
28402830

28412831
check_kernel(
28422832
F.elastic_bounding_boxes,

0 commit comments

Comments
 (0)