class_docstr: RNN Module.
  
  Args:
      idim (int): Dimension of the imput.
      elayers (int): Number of encoder layers.
      cdim (int): Number of rnn units.
      hdim (int): Number of projection units.
      dropout (float): Dropout rate.
      typ (str): Rnn type.
code: def __init__(self, idim, elayers, cdim, hdim, dropout, typ="lstm"):
      super(RNN, self).__init__()
      bidir = typ[0] == "b"
      if bidir:
          rnn = L.NStepBiLSTM if "lstm" in typ else L.NStepBiGRU
      else:
          rnn = L.NStepLSTM if "lstm" in typ else L.NStepGRU
      _cdim = 2 * cdim if bidir else cdim
      with self.init_scope():
          self.nbrnn = rnn(elayers, idim, cdim, dropout)
          self.l_last = L.Linear(_cdim, hdim)
      self.typ = typ
      self.bidir = bidir
  
imports: import logging
  import chainer
  import chainer.functions
  import chainer.links
  import numpy
  from chainer import cuda
  from espnet.nets.chainer_backend.nets_utils import _subsamplex
  from espnet.nets.e2e_asr_common import get_vgg2l_odim
label_desc: Use image node_id 1 to create a new RNN object from inherited base classes: chainer with example: obj = RNN(idim, elayers, cdim, hdim, dropout, typ)