class_docstr: Encoder for ABCNet.
  
  Args:
      in_channels (int): Number of input channels.
      out_channels (int): Number of output channels.
      init_cfg (dict or list[dict], optional): Initialization configs.
          Defaults to dict(type='Xavier', layer='Conv2d').
code: def __init__(
      self,
      in_channels: int = 256,
      hidden_channels: int = 256,
      out_channels: int = 256,
      init_cfg: Dict = None,
  ) -> None:
      super().__init__(init_cfg=init_cfg)
  
      self.layer = BidirectionalLSTM(
          in_channels, hidden_channels, out_channels
      )
  
file_path: mmocr/projects/ABCNet/abcnet/model/abcnet_rec_encoder.py
imports: from typing import Dict, Optional, Sequence
  import torch
  from mmocr.models.textrecog.encoders.base import BaseEncoder
  from mmocr.models.textrecog.layers import BidirectionalLSTM
  from mmocr.registry import MODELS
  from mmocr.structures import TextRecogDataSample
label_desc: Use image node_id 1 to create a new ABCNetRecEncoder object from inherited base classes: BaseEncoder with example: obj = ABCNetRecEncoder(in_channels, hidden_channels, out_channels, init_cfg)