@@ -25,8 +25,8 @@ class RandomErasing(_RandomApplyTransform):
2525 p (float, optional): probability that the random erasing operation will be performed.
2626 scale (tuple of float, optional): range of proportion of erased area against input image.
2727 ratio (tuple of float, optional): range of aspect ratio of erased area.
28- value (number or tuple of numbers): erasing value. Default is 0. If a single int, it is used to
29- erase all pixels. If a tuple of length 3, it is used to erase
28+ value (number, str, or tuple of numbers): erasing value. Default is 0. If a single int,
29+ it is used to erase all pixels. If a tuple of length 3, it is used to erase
3030 R, G, B channels respectively.
3131 If a str of 'random', erasing each pixel with random values.
3232 inplace (bool, optional): boolean to make this transform inplace. Default set to False.
@@ -59,7 +59,7 @@ def __init__(
5959 p : float = 0.5 ,
6060 scale : Sequence [float ] = (0.02 , 0.33 ),
6161 ratio : Sequence [float ] = (0.3 , 3.3 ),
62- value : float = 0.0 ,
62+ value : Union [ float , int , str , Sequence [ Union [ float , int ]]] = 0.0 ,
6363 inplace : bool = False ,
6464 ):
6565 super ().__init__ (p = p )
0 commit comments