class_docstr: RNN with projection layer module.
  
  Args:
      idim (int): Dimension of inputs.
      elayers (int): Number of encoder layers.
      cdim (int): Number of rnn units. (resulted in cdim * 2 if bidirectional)
      hdim (int): Number of projection units.
      subsample (np.ndarray): List to use sabsample the input array.
      dropout (float): Dropout rate.
      typ (str): The RNN type.
code: def __init__(
      self, idim, elayers, cdim, hdim, subsample, dropout, typ="blstm"
  ):
      super(RNNP, 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
      rnn_label = "birnn" if bidir else "rnn"
      with self.init_scope():
          for i in range(elayers):
              if i == 0:
                  inputdim = idim
              else:
                  inputdim = hdim
              _cdim = 2 * cdim if bidir else cdim
              # bottleneck layer to merge
              setattr(
                  self,
                  "{}{:d}".format(rnn_label, i),
                  rnn(1, inputdim, cdim, dropout),
              )
              setattr(self, "bt%d" % i, L.Linear(_cdim, hdim))
  
      self.elayers = elayers
      self.rnn_label = rnn_label
      self.cdim = cdim
      self.subsample = subsample
      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 RNNP object from inherited base classes: chainer with example: obj = RNNP(idim, elayers, cdim, hdim, subsample, dropout, typ)