class_docstr: For aster or crnn
code: def __init__(self, with_lstm=True, n_group=1, in_channels=3):
      super(ResNet_ASTER, self).__init__()
      self.with_lstm = with_lstm
      self.n_group = n_group
  
      self.layer0 = nn.Sequential(
          nn.Conv2D(
              in_channels,
              32,
              kernel_size=(3, 3),
              stride=1,
              padding=1,
              bias_attr=False,
          ),
          nn.BatchNorm2D(32),
          nn.ReLU(),
      )
  
      self.inplanes = 32
      self.layer1 = self._make_layer(32, 3, [2, 2])  # [16, 50]
      self.layer2 = self._make_layer(64, 4, [2, 2])  # [8, 25]
      self.layer3 = self._make_layer(128, 6, [2, 1])  # [4, 25]
      self.layer4 = self._make_layer(256, 6, [2, 1])  # [2, 25]
      self.layer5 = self._make_layer(512, 3, [2, 1])  # [1, 25]
  
      if with_lstm:
          self.rnn = nn.LSTM(
              512, 256, direction="bidirect", num_layers=2
          )
          self.out_channels = 2 * 256
      else:
          self.out_channels = 512
  
file_path: PaddleOCR/ppocr/modeling/backbones/rec_resnet_aster.py
imports: import paddle
  import paddle.nn
  import sys
  import math
label_desc: Use image node_id 1 to create a new ResNet_ASTER object from inherited base classes: nn with example: obj = ResNet_ASTER(with_lstm, n_group, in_channels)