Skip to content

Commit 0a166fd

Browse files
committed
Fixed misplaced type annotation
1 parent ad7b2be commit 0a166fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/transforms/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ class RandomCrop(torch.nn.Module):
465465

466466
@staticmethod
467467
def get_params(img, output_size):
468+
# type: (Tensor, Tuple[int, int]) -> Tuple[int, int, int, int]
468469
"""Get parameters for ``crop`` for a random crop.
469470
470471
Args:
@@ -474,7 +475,6 @@ def get_params(img, output_size):
474475
Returns:
475476
tuple: params (i, j, h, w) to be passed to ``crop`` for random crop.
476477
"""
477-
# type: (Tensor, Tuple[int, int]) -> Tuple[int, int, int, int]
478478
w, h = F._get_image_size(img)
479479
th, tw = output_size
480480
if w == tw and h == th:

0 commit comments

Comments
 (0)