class_docstr: Rectification Network of RARE, namely TPS based STN 
class_docstr_tok: ["Rectification","Network","of","RARE",",","namely","TPS","based","STN"]
code: def forward(self, batch_I):
      batch_C_prime = self.LocalizationNetwork(
          batch_I
      )  # batch_size x K x 2
      build_P_prime = self.GridGenerator.build_P_prime(
          batch_C_prime
      )  # batch_size x n (= I_r_width x I_r_height) x 2
      build_P_prime_reshape = build_P_prime.reshape(
          [build_P_prime.size(0), self.I_r_size[0], self.I_r_size[1], 2]
      )
      batch_I_r = F.grid_sample(
          batch_I, build_P_prime_reshape, padding_mode="border"
      )
  
      return batch_I_r
  
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 2 for calling the TPS_SpatialTransformerNetwork obj's underlying member method code with example usage: obj.forward(batch_I) and returns: batch_I_r