docstr: Perform an affine transforms with various sub-transforms, using
  only one interpolation and without having to instantiate each
  sub-transform individually.
  
  Arguments
  ---------
  tform_matrix : a 2x3 or 3x3 matrix
      affine transformation matrix to apply
  
  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","--","--","--","--","-","tform_matrix",":","a","2x3","or","3x3","matrix","affine","transformation","matrix","to","apply","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, tform_matrix, interp="bilinear"):
      """
      Perform an affine transforms with various sub-transforms, using
      only one interpolation and without having to instantiate each
      sub-transform individually.
  
      Arguments
      ---------
      tform_matrix : a 2x3 or 3x3 matrix
          affine transformation matrix to apply
  
      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.tform_matrix = tform_matrix
      self.interp = interp
  
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 Affine object  with example: obj = Affine(tform_matrix, interp)