code: def __init__(
      self,
      input_size,
      hidden_size,
      output_size=None,
      num_layers=1,
      dropout=0,
      direction=False,
      time_major=False,
      with_linear=False,
  ):
      super(BidirectionalLSTM, self).__init__()
      self.with_linear = with_linear
      self.rnn = nn.LSTM(
          input_size,
          hidden_size,
          num_layers=num_layers,
          dropout=dropout,
          direction=direction,
          time_major=time_major,
      )
  
      # text recognition the specified structure LSTM with linear
      if self.with_linear:
          self.linear = nn.Linear(hidden_size * 2, output_size)
  
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 BidirectionalLSTM object from inherited base classes: nn with example: obj = BidirectionalLSTM(input_size, hidden_size, output_size, num_layers, dropout, direction, time_major, with_linear)