Skip to content

Commit dc518ad

Browse files
committed
fix comment
1 parent 2785ba4 commit dc518ad

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test/test_transforms_v2_refactored.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,18 +2582,18 @@ def test_functional_image_correctness(self, kwargs):
25822582
def test_transform(self, param, value, make_input):
25832583
input = make_input(self.INPUT_SIZE)
25842584

2585-
kwargs = {param: value}
2586-
if param != "size":
2587-
# 1. size is required
2588-
# 2. the fill parameter only has an affect if we need padding
2589-
kwargs["size"] = [s + 4 for s in self.INPUT_SIZE]
25902585
if param == "fill":
25912586
if isinstance(input, tv_tensors.Mask) and isinstance(value, (tuple, list)):
25922587
pytest.skip("F.pad_mask doesn't support non-scalar fill.")
25932588

2594-
kwargs["fill"] = adapt_fill(
2595-
kwargs["fill"], dtype=input.dtype if isinstance(input, torch.Tensor) else torch.uint8
2589+
kwargs = dict(
2590+
# 1. size is required
2591+
# 2. the fill parameter only has an affect if we need padding
2592+
size=[s + 4 for s in self.INPUT_SIZE],
2593+
fill=adapt_fill(value, dtype=input.dtype if isinstance(input, torch.Tensor) else torch.uint8),
25962594
)
2595+
else:
2596+
kwargs = {param: value}
25972597

25982598
check_transform(
25992599
transforms.RandomCrop(**kwargs, pad_if_needed=True),

0 commit comments

Comments
 (0)