parameters: (image, saturation_factor, name=None)
docstring: Adjust saturation of RGB images.
  
    This is a convenience method that converts RGB images to float
    representation, converts them to HSV, add an offset to the saturation channel,
    converts back to RGB and then back to the original data type. If several
    adjustments are chained it is advisable to minimize the number of redundant
    conversions.
  
    `image` is an RGB image or images.  The image saturation is adjusted by
    converting the images to HSV and multiplying the saturation (S) channel by
    `saturation_factor` and clipping. The images are then converted back to RGB.
  
    Args:
      image: RGB image or images. Size of the last dimension must be 3.
      saturation_factor: float. Factor to multiply the saturation by.
      name: A name for this operation (optional).
  
    Returns:
      Adjusted image(s), same shape and DType as `image`.
      
    Usage Example:
      ```python
      >> import tensorflow as tf
      >> x = tf.random.normal(shape=(256, 256, 3))
      >> tf.image.adjust_saturation(x, 0.5)
      ```
      
    Raises:
      InvalidArgumentError: input must have 3 channels
docstring_summary: Adjust saturation of RGB images.
docstring_tokens: Adjust saturation of RGB images .
function: def adjust_saturation(image, saturation_factor, name=None):
    """Adjust saturation of RGB images.
  
    This is a convenience method that converts RGB images to float
    representation, converts them to HSV, add an offset to the saturation channel,
    converts back to RGB and then back to the original data type. If several
    adjustments are chained it is advisable to minimize the number of redundant
    conversions.
  
    `image` is an RGB image or images.  The image saturation is adjusted by
    converting the images to HSV and multiplying the saturation (S) channel by
    `saturation_factor` and clipping. The images are then converted back to RGB.
  
    Args:
      image: RGB image or images. Size of the last dimension must be 3.
      saturation_factor: float. Factor to multiply the saturation by.
      name: A name for this operation (optional).
  
    Returns:
      Adjusted image(s), same shape and DType as `image`.
      
    Usage Example:
      ```python
      >> import tensorflow as tf
      >> x = tf.random.normal(shape=(256, 256, 3))
      >> tf.image.adjust_saturation(x, 0.5)
      ```
      
    Raises:
      InvalidArgumentError: input must have 3 channels
    """
    with ops.name_scope(name, 'adjust_saturation', [image]) as name:
      image = ops.convert_to_tensor(image, name='image')
      # Remember original dtype to so we can convert back if needed
      orig_dtype = image.dtype
      if orig_dtype in (dtypes.float16, dtypes.float32):
        flt_image = image
      else:
        flt_image = convert_image_dtype(image, dtypes.float32)
  
      adjusted = gen_image_ops.adjust_saturation(flt_image, saturation_factor)
  
      return convert_image_dtype(adjusted, orig_dtype)
function_tokens: def adjust_saturation ( image , saturation_factor , name = None ) : with ops . name_scope ( name , 'adjust_saturation' , [ image ] ) as name : image = ops . convert_to_tensor ( image , name = 'image' ) # Remember original dtype to so we can convert back if needed orig_dtype = image . dtype if orig_dtype in ( dtypes . float16 , dtypes . float32 ) : flt_image = image else : flt_image = convert_image_dtype ( image , dtypes . float32 ) adjusted = gen_image_ops . adjust_saturation ( flt_image , saturation_factor ) return convert_image_dtype ( adjusted , orig_dtype )