Skip to content

Commit ce441f6

Browse files
authored
remove trailing _tensor from image kernel checks (#7908)
1 parent a2189d6 commit ce441f6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/test_transforms_v2_refactored.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def _compute_output_size(self, *, input_size, size, max_size):
459459
@pytest.mark.parametrize("antialias", [True, False])
460460
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
461461
@pytest.mark.parametrize("device", cpu_and_cuda())
462-
def test_kernel_image_tensor(self, size, interpolation, use_max_size, antialias, dtype, device):
462+
def test_kernel_image(self, size, interpolation, use_max_size, antialias, dtype, device):
463463
if not (max_size_kwarg := self._make_max_size_kwarg(use_max_size=use_max_size, size=size)):
464464
return
465465

@@ -830,7 +830,7 @@ def test_float16_no_rounding(self):
830830
class TestHorizontalFlip:
831831
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
832832
@pytest.mark.parametrize("device", cpu_and_cuda())
833-
def test_kernel_image_tensor(self, dtype, device):
833+
def test_kernel_image(self, dtype, device):
834834
check_kernel(F.horizontal_flip_image, make_image(dtype=dtype, device=device))
835835

836836
@pytest.mark.parametrize("format", list(tv_tensors.BoundingBoxFormat))
@@ -980,7 +980,7 @@ def _check_kernel(self, kernel, input, *args, **kwargs):
980980
)
981981
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
982982
@pytest.mark.parametrize("device", cpu_and_cuda())
983-
def test_kernel_image_tensor(self, param, value, dtype, device):
983+
def test_kernel_image(self, param, value, dtype, device):
984984
if param == "fill":
985985
value = adapt_fill(value, dtype=dtype)
986986
self._check_kernel(
@@ -1280,7 +1280,7 @@ def test_transform_unknown_fill_error(self):
12801280
class TestVerticalFlip:
12811281
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
12821282
@pytest.mark.parametrize("device", cpu_and_cuda())
1283-
def test_kernel_image_tensor(self, dtype, device):
1283+
def test_kernel_image(self, dtype, device):
12841284
check_kernel(F.vertical_flip_image, make_image(dtype=dtype, device=device))
12851285

12861286
@pytest.mark.parametrize("format", list(tv_tensors.BoundingBoxFormat))
@@ -1404,7 +1404,7 @@ class TestRotate:
14041404
)
14051405
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
14061406
@pytest.mark.parametrize("device", cpu_and_cuda())
1407-
def test_kernel_image_tensor(self, param, value, dtype, device):
1407+
def test_kernel_image(self, param, value, dtype, device):
14081408
kwargs = {param: value}
14091409
if param != "angle":
14101410
kwargs["angle"] = self._MINIMAL_AFFINE_KWARGS["angle"]
@@ -2382,7 +2382,7 @@ def _make_displacement(self, inpt):
23822382
)
23832383
@pytest.mark.parametrize("dtype", [torch.float32, torch.uint8])
23842384
@pytest.mark.parametrize("device", cpu_and_cuda())
2385-
def test_kernel_image_tensor(self, param, value, dtype, device):
2385+
def test_kernel_image(self, param, value, dtype, device):
23862386
image = make_image_tensor(dtype=dtype, device=device)
23872387

23882388
check_kernel(

0 commit comments

Comments
 (0)