Skip to content

Commit ec93ba3

Browse files
committed
cleanup commnet, variable names
1 parent d3e4573 commit ec93ba3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/test_transforms_v2.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,10 +2670,10 @@ def test_functional(self, make_input, input_dtype, output_dtype, device, scale):
26702670
@pytest.mark.parametrize("scale", (True, False))
26712671
@pytest.mark.parametrize("as_dict", (True, False))
26722672
def test_transform(self, make_input, input_dtype, output_dtype, device, scale, as_dict):
2673-
input = make_input(dtype=input_dtype, device=device)
2673+
inpt = make_input(dtype=input_dtype, device=device)
26742674
if as_dict:
2675-
output_dtype = {type(input): output_dtype}
2676-
check_transform(transforms.ToDtype(dtype=output_dtype, scale=scale), input, check_sample_input=not as_dict)
2675+
output_dtype = {type(inpt): output_dtype}
2676+
check_transform(transforms.ToDtype(dtype=output_dtype, scale=scale), inpt, check_sample_input=not as_dict)
26772677

26782678
def reference_convert_dtype_image_tensor(self, image, dtype=torch.float, scale=False):
26792679
input_dtype = image.dtype
@@ -2749,14 +2749,14 @@ def test_image_correctness(self, input_dtype, output_dtype, device, scale, make_
27492749
if input_dtype == torch.uint8 and output_dtype == torch.uint16 and device == "cuda":
27502750
pytest.xfail("uint8 to uint16 conversion is not supported on cuda")
27512751

2752-
input = make_input(dtype=input_dtype, device=device)
2753-
out = F.to_dtype(input, dtype=output_dtype, scale=scale)
2752+
inpt = make_input(dtype=input_dtype, device=device)
2753+
out = F.to_dtype(inpt, dtype=output_dtype, scale=scale)
27542754

27552755
if make_input == make_image_cvcuda:
2756-
input = F.cvcuda_to_tensor(input)
2756+
inpt = F.cvcuda_to_tensor(inpt)
27572757
out = F.cvcuda_to_tensor(out)
27582758

2759-
expected = self.reference_convert_dtype_image_tensor(input, dtype=output_dtype, scale=scale)
2759+
expected = self.reference_convert_dtype_image_tensor(inpt, dtype=output_dtype, scale=scale)
27602760

27612761
atol = self._get_dtype_conversion_atol(input_dtype, output_dtype, scale)
27622762
torch.testing.assert_close(out, expected, rtol=0, atol=atol)

0 commit comments

Comments
 (0)