Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions torchvision/transforms/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,10 +1059,14 @@ def get_params(brightness: Optional[List[float]],
"""Get the parameters for the randomized transform to be applied on image.

Args:
brightness (tuple of float (min, max)): The range from which the brightness_factor is chosen uniformly.
contrast (tuple of float (min, max)): The range from which the contrast_factor is chosen uniformly.
saturation (tuple of float (min, max)): The range from which the saturation_factor is chosen uniformly.
hue (tuple of float (min, max)): The range from which the hue_factor is chosen uniformly.
brightness (tuple of float (min, max) or None): The range from which the brightness_factor is chosen
uniformly. Pass None to turn off the transformation.
contrast (tuple of float (min, max) or None): The range from which the contrast_factor is chosen
uniformly. Pass None to turn off the transformation.
saturation (tuple of float (min, max) or None): The range from which the saturation_factor is chosen
uniformly. Pass None to turn off the transformation.
hue (tuple of float (min, max) or None): The range from which the hue_factor is chosen uniformly.
Pass None to turn off the transformation.

Returns:
tuple: The parameters used to apply the randomized transform
Expand Down