class_docstr: Localization Network of RARE, which predicts C' (K x 2) from I (I_width x I_height) 
class_docstr_tok: ["Localization","Network","of","RARE",",","which","predicts","C","'","(","K","x","2",")","from","I","(","I_width","x","I_height",")"]
code: def __init__(self, F, I_channel_num):
      super(LocalizationNetwork, self).__init__()
      self.F = F
      self.I_channel_num = I_channel_num
      self.conv = nn.Sequential(
          nn.Conv2d(
              in_channels=self.I_channel_num,
              out_channels=64,
              kernel_size=3,
              stride=1,
              padding=1,
              bias=False,
          ),
          nn.BatchNorm2d(64),
          nn.ReLU(True),
          nn.MaxPool2d(
              2, 2
          ),  # batch_size x 64 x I_height/2 x I_width/2
          nn.Conv2d(64, 128, 3, 1, 1, bias=False),
          nn.BatchNorm2d(128),
          nn.ReLU(True),
          nn.MaxPool2d(
              2, 2
          ),  # batch_size x 128 x I_height/4 x I_width/4
          nn.Conv2d(128, 256, 3, 1, 1, bias=False),
          nn.BatchNorm2d(256),
          nn.ReLU(True),
          nn.MaxPool2d(
              2, 2
          ),  # batch_size x 256 x I_height/8 x I_width/8
          nn.Conv2d(256, 512, 3, 1, 1, bias=False),
          nn.BatchNorm2d(512),
          nn.ReLU(True),
          nn.AdaptiveAvgPool2d(1),  # batch_size x 512
      )
  
      self.localization_fc1 = nn.Sequential(
          nn.Linear(512, 256), nn.ReLU(True)
      )
      self.localization_fc2 = nn.Linear(256, self.F * 2)
  
      # Init fc2 in LocalizationNetwork
      self.localization_fc2.weight.data.fill_(0)
      """ see RARE paper Fig. 6 (a) """
      ctrl_pts_x = np.linspace(-1.0, 1.0, int(F / 2))
      ctrl_pts_y_top = np.linspace(0.0, -1.0, num=int(F / 2))
      ctrl_pts_y_bottom = np.linspace(1.0, 0.0, num=int(F / 2))
      ctrl_pts_top = np.stack([ctrl_pts_x, ctrl_pts_y_top], axis=1)
      ctrl_pts_bottom = np.stack(
          [ctrl_pts_x, ctrl_pts_y_bottom], axis=1
      )
      initial_bias = np.concatenate(
          [ctrl_pts_top, ctrl_pts_bottom], axis=0
      )
      self.localization_fc2.bias.data = (
          torch.from_numpy(initial_bias).float().view(-1)
      )
  
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 LocalizationNetwork object from inherited base classes: nn with example: obj = LocalizationNetwork(F, I_channel_num)