class_docstr: Implement BiLSTM encoder module in `ASTER: An Attentional Scene Text
  Recognizer with Flexible Rectification.
  
  <https://ieeexplore.ieee.org/abstract/document/8395027/`
  Args:
      in_channels (int): Number of input channels.
      num_layers (int): Layers of BiLSTM. Defaults to 2.
docstr: Args:
      feat (Tensor): Feature of shape (N, C, 1, W).
  Returns:
      Tensor: Output of BiLSTM.
docstr_tok: ["Args",":","feat","(","Tensor",")",":","Feature","of","shape","(","N",",","C",",","1",",","W",")",".","Returns",":","Tensor",":","Output","of","BiLSTM","."]
code: def forward(self, feat: torch.Tensor, img_metas=None) -> torch.Tensor:
      """
      Args:
          feat (Tensor): Feature of shape (N, C, 1, W).
      Returns:
          Tensor: Output of BiLSTM.
      """
      assert feat.dim() == 4
      assert feat.size(2) == 1, "height must be 1"
      feat = feat.squeeze(2).permute(0, 2, 1)
      feat, _ = self.bilstm(feat)
      return feat.contiguous()
  
imports: import torch
  import torch.nn
  from mmocr.registry import MODELS
  from .base import BaseEncoder
label_desc: Use image node_id 2 for calling the ASTEREncoder obj's underlying member method code with example usage: obj.forward(feat, img_metas) and returns: feat