class_docstr: Rectification Network of RARE, namely TPS based STN 
class_docstr_tok: ["Rectification","Network","of","RARE",",","namely","TPS","based","STN"]
docstr: Based on RARE TPS
  input:
      batch_I: Batch Input Image [batch_size x I_channel_num x I_height x I_width]
      I_size : (height, width) of the input image I
      I_r_size : (height, width) of the rectified image I_r
      I_channel_num : the number of channels of the input image I
  output:
      batch_I_r: rectified image [batch_size x I_channel_num x I_r_height x I_r_width]
docstr_tok: ["Based","on","RARE","TPS","input",":","batch_I",":","Batch","Input","Image","[","batch_size","x","I_channel_num","x","I_height","x","I_width","]","I_size",":","(","height",",","width",")","of","the","input","image","I","I_r_size",":","(","height",",","width",")","of","the","rectified","image","I_r","I_channel_num",":","the","number","of","channels","of","the","input","image","I","output",":","batch_I_r",":","rectified","image","[","batch_size","x","I_channel_num","x","I_r_height","x","I_r_width","]"]
code: def __init__(self, F, I_size, I_r_size, I_channel_num=1):
      """Based on RARE TPS
      input:
          batch_I: Batch Input Image [batch_size x I_channel_num x I_height x I_width]
          I_size : (height, width) of the input image I
          I_r_size : (height, width) of the rectified image I_r
          I_channel_num : the number of channels of the input image I
      output:
          batch_I_r: rectified image [batch_size x I_channel_num x I_r_height x I_r_width]
      """
      super(TPS_SpatialTransformerNetwork, self).__init__()
      self.F = F
      self.I_size = I_size
      self.I_r_size = I_r_size  # = (I_r_height, I_r_width)
      self.I_channel_num = I_channel_num
      self.LocalizationNetwork = LocalizationNetwork(
          self.F, self.I_channel_num
      )
      self.GridGenerator = GridGenerator(self.F, self.I_r_size)
  
file_path: EasyOCR/trainer/modules/transformation.py
imports: import numpy
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new TPS_SpatialTransformerNetwork object from inherited base classes: nn with example: obj = TPS_SpatialTransformerNetwork(F, I_size, I_r_size, I_channel_num)