docstr: Perform an affine transforms with various sub-transforms, using
  only one interpolation and without having to instantiate each
  sub-transform individually.
  
  Arguments
  ---------
  rotation_range : one integer or float
      image will be rotated randomly between (-degrees, degrees) 
  
  translation_range : a float or a tuple/list with 2 floats between [0, 1)
      first value:
          image will be horizontally shifted between 
          (-height_range * height_dimension, height_range * height_dimension)
      second value:
          Image will be vertically shifted between 
          (-width_range * width_dimension, width_range * width_dimension)
  
  shear_range : float
      image will be sheared randomly between (-degrees, degrees)
  
  zoom_range : list/tuple with two floats between [0, infinity).
      first float should be less than the second
      lower and upper bounds on percent zoom. 
      Anything less than 1.0 will zoom in on the image, 
      anything greater than 1.0 will zoom out on the image.
      e.g. (0.7, 1.0) will only zoom in, 
           (1.0, 1.4) will only zoom out,
           (0.7, 1.4) will randomly zoom in or out
  
  interp : string in {'bilinear', 'nearest'} or list of strings
      type of interpolation to use. You can provide a different
      type of interpolation for each input, e.g. if you have two
      inputs then you can say `interp=['bilinear','nearest']
docstr_tok: ["Perform","an","affine","transforms","with","various","sub-transforms",",","using","only","one","interpolation","and","without","having","to","instantiate","each","sub-transform","individually",".","Arguments","--","--","--","--","-","rotation_range",":","one","integer","or","float","image","will","be","rotated","randomly","between","(","-degrees",",","degrees",")","translation_range",":","a","float","or","a","tuple\/list","with","2","floats","between","[","0",",","1",")","first","value",":","image","will","be","horizontally","shifted","between","(","-height_range","*","height_dimension",",","height_range","*","height_dimension",")","second","value",":","Image","will","be","vertically","shifted","between","(","-width_range","*","width_dimension",",","width_range","*","width_dimension",")","shear_range",":","float","image","will","be","sheared","randomly","between","(","-degrees",",","degrees",")","zoom_range",":","list\/tuple","with","two","floats","between","[","0",",","infinity",")",".","first","float","should","be","less","than","the","second","lower","and","upper","bounds","on","percent","zoom",".","Anything","less","than","1.0","will","zoom","in","on","the","image",",","anything","greater","than","1.0","will","zoom","out","on","the","image",".","e.g",".","(","0.7",",","1.0",")","will","only","zoom","in",",","(","1.0",",","1.4",")","will","only","zoom","out",",","(","0.7",",","1.4",")","will","randomly","zoom","in","or","out","interp",":","string","in","{","'bilinear","'",",","'nearest","'","}","or","list","of","strings","type","of","interpolation","to","use",".","You","can","provide","a","different","type","of","interpolation","for","each","input",",","e.g",".","if","you","have","two","inputs","then","you","can","say","`","interp=","[","'bilinear","'",",","'nearest","'","]"]
code: def __init__(
      self,
      rotation_range=None,
      translation_range=None,
      shear_range=None,
      zoom_range=None,
      interp="bilinear",
      lazy=False,
  ):
      """
      Perform an affine transforms with various sub-transforms, using
      only one interpolation and without having to instantiate each
      sub-transform individually.
  
      Arguments
      ---------
      rotation_range : one integer or float
          image will be rotated randomly between (-degrees, degrees)
  
      translation_range : a float or a tuple/list with 2 floats between [0, 1)
          first value:
              image will be horizontally shifted between
              (-height_range * height_dimension, height_range * height_dimension)
          second value:
              Image will be vertically shifted between
              (-width_range * width_dimension, width_range * width_dimension)
  
      shear_range : float
          image will be sheared randomly between (-degrees, degrees)
  
      zoom_range : list/tuple with two floats between [0, infinity).
          first float should be less than the second
          lower and upper bounds on percent zoom.
          Anything less than 1.0 will zoom in on the image,
          anything greater than 1.0 will zoom out on the image.
          e.g. (0.7, 1.0) will only zoom in,
               (1.0, 1.4) will only zoom out,
               (0.7, 1.4) will randomly zoom in or out
  
      interp : string in {'bilinear', 'nearest'} or list of strings
          type of interpolation to use. You can provide a different
          type of interpolation for each input, e.g. if you have two
          inputs then you can say `interp=['bilinear','nearest']
  
      """
      self.transforms = []
      if rotation_range is not None:
          rotation_tform = RandomRotate(rotation_range, lazy=True)
          self.transforms.append(rotation_tform)
  
      if translation_range is not None:
          translation_tform = RandomTranslate(
              translation_range, lazy=True
          )
          self.transforms.append(translation_tform)
  
      if shear_range is not None:
          shear_tform = RandomShear(shear_range, lazy=True)
          self.transforms.append(shear_tform)
  
      if zoom_range is not None:
          zoom_tform = RandomZoom(zoom_range, lazy=True)
          self.transforms.append(zoom_tform)
  
      self.interp = interp
      self.lazy = lazy
  
      if len(self.transforms) == 0:
          raise Exception("Must give at least one transform parameter")
  
imports: import math
  import random
  import torch
  from ..utils import th_affine2d, th_random_choice
label_desc: Use image node_id 1 to create a new RandomAffine object  with example: obj = RandomAffine(rotation_range, translation_range, shear_range, zoom_range, interp, lazy)