class_docstr: RNN module
  
  :param int idim: dimension of inputs
  :param int elayers: number of encoder layers
  :param int cdim: number of rnn units (resulted in cdim * 2 if bidirectional)
  :param int hdim: number of final projection units
  :param float dropout: dropout rate
  :param str typ: The RNN type
code: def __init__(self, idim, elayers, cdim, hdim, dropout, typ="blstm"):
      super(RNN, self).__init__()
      bidir = typ[0] == "b"
      self.nbrnn = (
          torch.nn.LSTM(
              idim,
              cdim,
              elayers,
              batch_first=True,
              dropout=dropout,
              bidirectional=bidir,
          )
          if "lstm" in typ
          else torch.nn.GRU(
              idim,
              cdim,
              elayers,
              batch_first=True,
              dropout=dropout,
              bidirectional=bidir,
          )
      )
      if bidir:
          self.l_last = torch.nn.Linear(cdim * 2, hdim)
      else:
          self.l_last = torch.nn.Linear(cdim, hdim)
      self.typ = typ
  
imports: import logging
  import numpy
  import torch
  import torch.nn.functional
  from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
  from espnet.nets.e2e_asr_common import get_vgg2l_odim
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask, to_device
label_desc: Use image node_id 1 to create a new RNN object from inherited base classes: torch.nn with example: obj = RNN(idim, elayers, cdim, hdim, dropout, typ)