code: def __init__(self, opt):
      super(Model, self).__init__()
      self.opt = opt
      self.stages = {
          "Trans": opt.Transformation,
          "Feat": opt.FeatureExtraction,
          "Seq": opt.SequenceModeling,
          "Pred": opt.Prediction,
      }
  
      """ Transformation """
      if opt.Transformation == "TPS":
          self.Transformation = TPS_SpatialTransformerNetwork(
              F=opt.num_fiducial,
              I_size=(opt.imgH, opt.imgW),
              I_r_size=(opt.imgH, opt.imgW),
              I_channel_num=opt.input_channel,
          )
      else:
          print("No Transformation module specified")
  
      """ FeatureExtraction """
      if opt.FeatureExtraction == "VGG":
          self.FeatureExtraction = VGG_FeatureExtractor(
              opt.input_channel, opt.output_channel
          )
      elif opt.FeatureExtraction == "RCNN":
          self.FeatureExtraction = RCNN_FeatureExtractor(
              opt.input_channel, opt.output_channel
          )
      elif opt.FeatureExtraction == "ResNet":
          self.FeatureExtraction = ResNet_FeatureExtractor(
              opt.input_channel, opt.output_channel
          )
      else:
          raise Exception("No FeatureExtraction module specified")
      self.FeatureExtraction_output = (
          opt.output_channel
      )  # int(imgH/16-1) * 512
      self.AdaptiveAvgPool = nn.AdaptiveAvgPool2d(
          (None, 1)
      )  # Transform final (imgH/16-1) -> 1
  
      """ Sequence modeling"""
      if opt.SequenceModeling == "BiLSTM":
          self.SequenceModeling = nn.Sequential(
              BidirectionalLSTM(
                  self.FeatureExtraction_output,
                  opt.hidden_size,
                  opt.hidden_size,
              ),
              BidirectionalLSTM(
                  opt.hidden_size, opt.hidden_size, opt.hidden_size
              ),
          )
          self.SequenceModeling_output = opt.hidden_size
      else:
          print("No SequenceModeling module specified")
          self.SequenceModeling_output = self.FeatureExtraction_output
  
      """ Prediction """
      if opt.Prediction == "CTC":
          self.Prediction = nn.Linear(
              self.SequenceModeling_output, opt.num_class
          )
      elif opt.Prediction == "Attn":
          self.Prediction = Attention(
              self.SequenceModeling_output,
              opt.hidden_size,
              opt.num_class,
          )
      else:
          raise Exception("Prediction is neither CTC or Attn")
  
file_path: EasyOCR/trainer/model.py
imports: import torch.nn
  from modules.transformation import TPS_SpatialTransformerNetwork
  from modules.feature_extraction import VGG_FeatureExtractor, RCNN_FeatureExtractor, ResNet_FeatureExtractor
  from modules.sequence_modeling import BidirectionalLSTM
  from modules.prediction import Attention
label_desc: Use image node_id 1 to create a new Model object from inherited base classes: nn with example: obj = Model(opt)