Skip to content

Commit 3211b7e

Browse files
aosokinsoumith
authored andcommitted
Fix docs for CenterCrop and RandomCrop (#203)
Wrong order of dimensions In transforms.CenterCrop and transforms.RandomCrop: Documentation says it should be (w, h), but it actually is (h, w). Fixing docs to match the code
1 parent 47bc815 commit 3211b7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

torchvision/transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class CenterCrop(object):
204204
205205
Args:
206206
size (sequence or int): Desired output size of the crop. If size is an
207-
int instead of sequence like (w, h), a square crop (size, size) is
207+
int instead of sequence like (h, w), a square crop (size, size) is
208208
made.
209209
"""
210210

@@ -275,7 +275,7 @@ class RandomCrop(object):
275275
276276
Args:
277277
size (sequence or int): Desired output size of the crop. If size is an
278-
int instead of sequence like (w, h), a square crop (size, size) is
278+
int instead of sequence like (h, w), a square crop (size, size) is
279279
made.
280280
padding (int or sequence, optional): Optional padding on each border
281281
of the image. Default is 0, i.e no padding. If a sequence of length

0 commit comments

Comments
 (0)