class_docstr: __init__(self, n_layers, in_size, out_size, dropout, *, initialW=None, initial_bias=None)
  
  Base link class for Stacked RNN/BiRNN links.
  
  This link is base link class for :func:`chainer.links.NStepRNN` and
  :func:`chainer.links.NStepBiRNN`.
  
  This link's behavior depends on argument, ``use_bi_direction``.
  
  Args:
      n_layers (int): Number of layers.
      in_size (int): Dimensionality of input vectors.
      out_size (int): Dimensionality of hidden states and output vectors.
      dropout (float): Dropout ratio.
      initialW (:ref:`initializer <initializer>`): Initializer to initialize
          the weight. When it is :class:`numpy.ndarray`,
          its ``ndim`` should be 2. If ``initialW`` is ``None``, then the
          weights are initialized with i.i.d. Gaussian samples, each of which
          has zero mean and deviation :math:`\sqrt{1/\text{in_size}}`.
      initial_bias (:ref:`initializer <initializer>`): Initializer to
          initialize the bias. If ``None``, the bias will be initialized to
          zero. When it is :class:`numpy.ndarray`, its ``ndim`` should be 1.
  
  .. seealso::
      :func:`chainer.links.NStepRNNReLU`
      :func:`chainer.links.NStepRNNTanh`
      :func:`chainer.links.NStepBiRNNReLU`
      :func:`chainer.links.NStepBiRNNTanh`
code: def __init__(
      self,
      n_layers,
      in_size,
      out_size,
      dropout,
      *,
      initialW=None,
      initial_bias=None,
      **kwargs,
  ):
      if kwargs:
          argument.check_unexpected_kwargs(
              kwargs,
              use_cudnn="use_cudnn argument is not supported anymore. "
              "Use chainer.using_config",
              use_bi_direction="use_bi_direction is not supported anymore",
              activation="activation is not supported anymore",
          )
          argument.assert_kwargs_empty(kwargs)
  
      weights = []
      if self.use_bi_direction:
          direction = 2
      else:
          direction = 1
  
      W_initializer = initializers._get_initializer(initialW)
      if initial_bias is None:
          initial_bias = 0
      bias_initializer = initializers._get_initializer(initial_bias)
  
      for i in six.moves.range(n_layers):
          for di in six.moves.range(direction):
              weight = link.Link()
              with weight.init_scope():
                  for j in six.moves.range(self.n_weights):
                      if i == 0 and j < self.n_weights // 2:
                          w_in = in_size
                      elif i > 0 and j < self.n_weights // 2:
                          w_in = out_size * direction
                      else:
                          w_in = out_size
                      w = variable.Parameter(
                          W_initializer, (out_size, w_in)
                      )
                      b = variable.Parameter(bias_initializer, out_size)
                      setattr(weight, "w%d" % j, w)
                      setattr(weight, "b%d" % j, b)
              weights.append(weight)
  
      super(NStepRNNBase, self).__init__(*weights)
  
      self.ws = [
          [
              getattr(layer, "w%d" % i)
              for i in six.moves.range(self.n_weights)
          ]
          for layer in self
      ]
      self.bs = [
          [
              getattr(layer, "b%d" % i)
              for i in six.moves.range(self.n_weights)
          ]
          for layer in self
      ]
  
      self.n_layers = n_layers
      self.dropout = dropout
      self.out_size = out_size
      self.direction = direction
  
imports: import numpy
  import six
  import chainer
  from chainer.functions.array import permutate
  from chainer.functions.array import transpose_sequence
  from chainer.functions.rnn import n_step_rnn
  from chainer import initializers
  from chainer import link
  from chainer.utils import argument
  from chainer import variable
label_desc: Use image node_id 1 to create a new NStepRNNBase object from inherited base classes: link with example: obj = NStepRNNBase(n_layers, in_size, out_size, dropout)