Skip to content

Commit 016784b

Browse files
committed
Make _is_tensor_a_torch_image more generic
1 parent 6239988 commit 016784b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchvision/transforms/functional_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
def _is_tensor_a_torch_image(input):
7-
return len(input.shape) == 3
7+
return input.ndim >= 2
88

99

1010
def vflip(img):

0 commit comments

Comments
 (0)