Skip to content

Commit 4341640

Browse files
Update transform doc with random offset of padding due to pad_if_needed
Updating transform docs with the random offset of padding when pad_if_needed is set to True.
1 parent 138b5c2 commit 4341640

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
@@ -396,7 +396,7 @@ class RandomCrop(object):
396396
4 is provided, it is used to pad left, top, right, bottom borders
397397
respectively. If a sequence of length 2 is provided, it is used to
398398
pad left/right, top/bottom borders, respectively.
399-
pad_if_needed (boolean): It will pad the image if smaller than the
399+
pad_if_needed (boolean): It will pad the image (with random offset) if smaller than the
400400
desired size to avoid raising an exception.
401401
fill: Pixel fill value for constant fill. Default is 0. If a tuple of
402402
length 3, it is used to fill R, G, B channels respectively.

0 commit comments

Comments
 (0)