class_docstr: Collection of various image augmentation methods.
  
  # Arguments
      translation_factor: A positive float represented as fraction value, or a
          tuple of 2 representing fraction for translation vertically and
          horizontally, or a kerastuner.engine.hyperparameters.Choice range
          of positive floats. For instance, `translation_factor=0.2` result
          in a random translation factor within 20% of the width and height.
          If left unspecified, it will be tuned automatically.
      vertical_flip: Boolean. Whether to flip the image vertically.
          If left unspecified, it will be tuned automatically.
      horizontal_flip: Boolean. Whether to flip the image horizontally.
          If left unspecified, it will be tuned automatically.
      rotation_factor: Float or kerastuner.engine.hyperparameters.Choice range
          between [0, 1]. A positive float represented as fraction of 2pi
          upper bound for rotating clockwise and counter-clockwise. When
          represented as a single float, lower = upper.
          If left unspecified, it will be tuned automatically.
      zoom_factor: A positive float represented as fraction value, or a tuple
          of 2 representing fraction for zooming vertically and horizontally,
          or a kerastuner.engine.hyperparameters.Choice range of positive
          floats.  For instance, `zoom_factor=0.2` result in a random zoom
          factor from 80% to 120%. If left unspecified, it will be tuned
          automatically.
      contrast_factor: A positive float represented as fraction of value, or a
          tuple of size 2 representing lower and upper bound, or a
          kerastuner.engine.hyperparameters.Choice range of floats to find the
          optimal value. When represented as a single float, lower = upper.
          The contrast factor will be randomly picked
          between [1.0 - lower, 1.0 + upper]. If left unspecified, it will be
          tuned automatically.
class_docstr_tok: ["Collection","of","various","image","augmentation","methods",".","#","Arguments","translation_factor",":","A","positive","float","represented","as","fraction","value",",","or","a","tuple","of","2","representing","fraction","for","translation","vertically","and","horizontally",",","or","a","kerastuner.engine.hyperparameters.Choice","range","of","positive","floats",".","For","instance",",","`","translation_factor=0.2","`","result","in","a","random","translation","factor","within","20","%","of","the","width","and","height",".","If","left","unspecified",",","it","will","be","tuned","automatically",".","vertical_flip",":","Boolean",".","Whether","to","flip","the","image","vertically",".","If","left","unspecified",",","it","will","be","tuned","automatically",".","horizontal_flip",":","Boolean",".","Whether","to","flip","the","image","horizontally",".","If","left","unspecified",",","it","will","be","tuned","automatically",".","rotation_factor",":","Float","or","kerastuner.engine.hyperparameters.Choice","range","between","[","0",",","1","]",".","A","positive","float","represented","as","fraction","of","2pi","upper","bound","for","rotating","clockwise","and","counter-clockwise",".","When","represented","as","a","single","float",",","lower","=","upper",".","If","left","unspecified",",","it","will","be","tuned","automatically",".","zoom_factor",":","A","positive","float","represented","as","fraction","value",",","or","a","tuple","of","2","representing","fraction","for","zooming","vertically","and","horizontally",",","or","a","kerastuner.engine.hyperparameters.Choice","range","of","positive","floats",".","For","instance",",","`","zoom_factor=0.2","`","result","in","a","random","zoom","factor","from","80","%","to","120","%",".","If","left","unspecified",",","it","will","be","tuned","automatically",".","contrast_factor",":","A","positive","float","represented","as","fraction","of","value",",","or","a","tuple","of","size","2","representing","lower","and","upper","bound",",","or","a","kerastuner.engine.hyperparameters.Choice","range","of","floats","to","find","the","optimal","value",".","When","represented","as","a","single","float",",","lower","=","upper",".","The","contrast","factor","will","be","randomly","picked","between","[","1.0","-","lower",",","1.0","+","upper","]",".","If","left","unspecified",",","it","will","be","tuned","automatically","."]
code: def __init__(
      self,
      translation_factor: Optional[
          Union[float, Tuple[float, float], hyperparameters.Choice]
      ] = None,
      vertical_flip: Optional[bool] = None,
      horizontal_flip: Optional[bool] = None,
      rotation_factor: Optional[
          Union[float, hyperparameters.Choice]
      ] = None,
      zoom_factor: Optional[
          Union[float, Tuple[float, float], hyperparameters.Choice]
      ] = None,
      contrast_factor: Optional[
          Union[float, Tuple[float, float], hyperparameters.Choice]
      ] = None,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.translation_factor = utils.get_hyperparameter(
          translation_factor,
          hyperparameters.Choice("translation_factor", [0.0, 0.1]),
          Union[float, Tuple[float, float]],
      )
      self.horizontal_flip = horizontal_flip
      self.vertical_flip = vertical_flip
      self.rotation_factor = utils.get_hyperparameter(
          rotation_factor,
          hyperparameters.Choice("rotation_factor", [0.0, 0.1]),
          float,
      )
      self.zoom_factor = utils.get_hyperparameter(
          zoom_factor,
          hyperparameters.Choice("zoom_factor", [0.0, 0.1]),
          Union[float, Tuple[float, float]],
      )
      self.contrast_factor = utils.get_hyperparameter(
          contrast_factor,
          hyperparameters.Choice("contrast_factor", [0.0, 0.1]),
          Union[float, Tuple[float, float]],
      )
  
imports: from typing import Optional
  from typing import Tuple
  from typing import Union
  from keras_tuner.engine import hyperparameters
  from tensorflow import nest
  from tensorflow.keras import layers
  from autokeras import analysers
  from autokeras import keras_layers
  from autokeras.engine import block
  from autokeras.utils import io_utils
  from autokeras.utils import utils
label_desc: Use image node_id 1 to create a new ImageAugmentation object from inherited base classes: block_module with example: obj = ImageAugmentation(translation_factor, vertical_flip, horizontal_flip, rotation_factor, zoom_factor, contrast_factor)