From eea766e593642cdc54a9fa66bcc2bafa5b2f3cee Mon Sep 17 00:00:00 2001 From: Anton Osokin Date: Mon, 17 Jul 2017 16:41:24 +0200 Subject: [PATCH] Fix docs for CenterCrop and RandomCrop 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 --- torchvision/transforms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchvision/transforms.py b/torchvision/transforms.py index 22e5da39264..6d649ab18fa 100644 --- a/torchvision/transforms.py +++ b/torchvision/transforms.py @@ -204,7 +204,7 @@ class CenterCrop(object): Args: size (sequence or int): Desired output size of the crop. If size is an - int instead of sequence like (w, h), a square crop (size, size) is + int instead of sequence like (h, w), a square crop (size, size) is made. """ @@ -275,7 +275,7 @@ class RandomCrop(object): Args: size (sequence or int): Desired output size of the crop. If size is an - int instead of sequence like (w, h), a square crop (size, size) is + int instead of sequence like (h, w), a square crop (size, size) is made. padding (int or sequence, optional): Optional padding on each border of the image. Default is 0, i.e no padding. If a sequence of length