Skip to content

Commit b19e2de

Browse files
committed
Add description for Nones.
1 parent 0d48832 commit b19e2de

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

torchvision/transforms/transforms.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,14 @@ def get_params(brightness: Optional[List[float]],
10591059
"""Get the parameters for the randomized transform to be applied on image.
10601060
10611061
Args:
1062-
brightness (tuple of float (min, max)): The range from which the brightness_factor is chosen uniformly.
1063-
contrast (tuple of float (min, max)): The range from which the contrast_factor is chosen uniformly.
1064-
saturation (tuple of float (min, max)): The range from which the saturation_factor is chosen uniformly.
1065-
hue (tuple of float (min, max)): The range from which the hue_factor is chosen uniformly.
1062+
brightness (tuple of float (min, max) or None): The range from which the brightness_factor is chosen
1063+
uniformly. Pass None to turn off the transformation.
1064+
contrast (tuple of float (min, max) or None): The range from which the contrast_factor is chosen
1065+
uniformly. Pass None to turn off the transformation.
1066+
saturation (tuple of float (min, max) or None): The range from which the saturation_factor is chosen
1067+
uniformly. Pass None to turn off the transformation.
1068+
hue (tuple of float (min, max) or None): The range from which the hue_factor is chosen uniformly.
1069+
Pass None to turn off the transformation.
10661070
10671071
Returns:
10681072
tuple: The parameters used to apply the randomized transform

0 commit comments

Comments
 (0)