@@ -400,11 +400,11 @@ class Pad(torch.nn.Module):
400
400
.. note::
401
401
In torchscript mode padding as single int is not supported, use a sequence of
402
402
length 1: ``[padding, ]``.
403
- fill (number or str or tuple): Pixel fill value for constant fill. Default is 0. If a tuple of
403
+ fill (number or tuple): Pixel fill value for constant fill. Default is 0. If a tuple of
404
404
length 3, it is used to fill R, G, B channels respectively.
405
405
This value is only used when the padding_mode is constant.
406
406
Only number is supported for torch Tensor.
407
- Only int or str or tuple value is supported for PIL Image.
407
+ Only int or tuple value is supported for PIL Image.
408
408
padding_mode (str): Type of padding. Should be: constant, edge, reflect or symmetric.
409
409
Default is constant.
410
410
@@ -428,7 +428,7 @@ def __init__(self, padding, fill=0, padding_mode="constant"):
428
428
if not isinstance (padding , (numbers .Number , tuple , list )):
429
429
raise TypeError ("Got inappropriate padding arg" )
430
430
431
- if not isinstance (fill , (numbers .Number , str , tuple , list )):
431
+ if not isinstance (fill , (numbers .Number , tuple , list )):
432
432
raise TypeError ("Got inappropriate fill arg" )
433
433
434
434
if padding_mode not in ["constant" , "edge" , "reflect" , "symmetric" ]:
@@ -595,11 +595,11 @@ class RandomCrop(torch.nn.Module):
595
595
pad_if_needed (boolean): It will pad the image if smaller than the
596
596
desired size to avoid raising an exception. Since cropping is done
597
597
after padding, the padding seems to be done at a random offset.
598
- fill (number or str or tuple): Pixel fill value for constant fill. Default is 0. If a tuple of
598
+ fill (number or tuple): Pixel fill value for constant fill. Default is 0. If a tuple of
599
599
length 3, it is used to fill R, G, B channels respectively.
600
600
This value is only used when the padding_mode is constant.
601
601
Only number is supported for torch Tensor.
602
- Only int or str or tuple value is supported for PIL Image.
602
+ Only int or tuple value is supported for PIL Image.
603
603
padding_mode (str): Type of padding. Should be: constant, edge, reflect or symmetric.
604
604
Default is constant.
605
605
0 commit comments