code: def __init__(
      self,
      in_channels,
      hidden_size,
      out_channels,
      num_layers=2,
      with_linear=False,
  ):
      super(EncoderWithCascadeRNN, self).__init__()
      self.out_channels = out_channels[-1]
      self.encoder = nn.LayerList(
          [
              BidirectionalLSTM(
                  in_channels if i == 0 else out_channels[i - 1],
                  hidden_size,
                  output_size=out_channels[i],
                  num_layers=1,
                  direction="bidirectional",
                  with_linear=with_linear,
              )
              for i in range(num_layers)
          ]
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import paddle
  from paddle import nn
  from ppocr.modeling.heads.rec_ctc_head import get_para_bias_attr
  from ppocr.modeling.backbones.rec_svtrnet import Block, ConvBNLayer, trunc_normal_, zeros_, ones_
label_desc: Use image node_id 1 to create a new EncoderWithCascadeRNN object from inherited base classes: nn with example: obj = EncoderWithCascadeRNN(in_channels, hidden_size, out_channels, num_layers, with_linear)