class_docstr: Sequential model which has a single-stream forward pass.
  
  .. warning::
  
      This feature is experimental. The interface can change in the future.
  
  This class enables to construct a network which has sequential structure
  easily. While :class:`~chainer.Chain` and :class:`~chainer.ChainList` can
  only take :class:`~chainer.Link` object as input to their constructor, this
  :class:`Sequential` can take arbitrary number of any callable objects for
  the forward pass computation. A :class:`Sequential` calls the given
  callable objects sequentially inside of the :meth:`~Sequential.forward`
  method in the same order as the given arguments.
  Therefore, you do not need to write the forward pass computation
  explicitly.
  
  .. admonition:: Example
  
      The below example code shows how to use this class to construct a
      simple sequential network::
  
        import chainer
        import chainer.functions as F
        import chainer.links as L
        from chainer import Sequential
  
        # Model definition without writing forward function
        model = Sequential(
            L.Linear(n_in, n_hidden),
            F.relu,
            L.Linear(n_hidden, n_hidden),
            F.relu,
            L.Linear(n_hidden, n_out)
        )
  
        # Compute the forward pass
        y = model(x)
  
      where ``x`` denotes a mini-batch of ``n_in``-dimensional input vectors.
  
      Furthermore, :class:`Sequential` supports built-in list APIs, so you
      can concatenate :class:`Sequential` objects to create a longer
      :class:`Sequential` model easily with the same ways as Python lists:
  
      >>> from chainer import Sequential
      >>> model_A = Sequential(L.Linear(10, 10), F.relu)
      >>> model_B = Sequential(L.Linear(10, 10), F.sigmoid)
      >>> model_C = model_A + model_B
  
      To repeat a :class:`Sequential` object multiple times, you can use
      :meth:`~chainer.Link.repeat` method.
  
      >>> model_D = model_A.repeat(3)
  
      You can also add your own functions or any callable objects to a
      :class:`Sequential` object::
  
        from chainer.links.model.vision.vgg import VGG16Layers
  
        model = Sequential()
        model.append(L.Linear(n_out, n_hidden))
        model.append(F.relu)
        model.append(lambda x: F.reshape(x, (1, 3, 224, 224)))
        model.append(VGG16Layers())
        model.append(lambda x: x['prob'])
  
        y = model(x)
  
      The above code example shows how to add some layers to the ``model``
      using :meth:`~Sequential.append` method and then add a large network
      (``VGG16Layers``) and finally add a lambda function to extract the
      ``prob`` output.
  
      You can check the structure of your model briefly using ``print``
      as following:
  
      >>> print(model_C)  # doctest: +ELLIPSIS
      Sequential(
        (0): Linear(in_size=10, out_size=10, nobias=False),
        (1): <function relu at 0x...>,
        (2): Linear(in_size=10, out_size=10, nobias=False),
        (3): <function sigmoid at 0x...>,
      )
  
      .. note::
  
          Note that a :class:`Sequential` link which has at least one
          ``lambda`` function as its member cannot be pickled. So, please
          use ``partial`` method from :mod:`functools` package instead::
  
            from functools import partial
  
            # This is not pickable
            model = Sequential(
                L.Convolution2D(None, 64, 3, 1, 1),
                lambda x: F.max_pooling_2d(x, 2)
            )
  
            # This is pickable
            model = Sequential(
                L.Convolution2D(None, 64, 3, 1, 1),
                partial(F.max_pooling_2d, ksize=2)
            )
  
  Args:
      layers: The layers which are called in its order. Each component should
          be a callable object including :class:`~chainer.Link` object and
          functions defined under the :mod:`chainer.functions`, e.g.,
          :func:`~chainer.functions.relu`, etc.
docstr: Count the number of layers by layer type.
  
  This method counts the number of layers which have the name given by
  the argument ``type_name``. For example, if you want to know the number
  of :class:`~links.Linear` layers included in this model, ``type_name``
  should be ``Linear``. If you want to know the number of
  :class:`~Function` classes or user-defined functions which have a
  specific name, ``type_name`` should be the function name, e.g.,
  ``relu`` or ``reshape``, etc.
  
  Args:
      type_name (str): The class or function name of a layer you want to
          enumerate.
docstr_tok: ["Count","the","number","of","layers","by","layer","type",".","This","method","counts","the","number","of","layers","which","have","the","name","given","by","the","argument","``","type_name","``",".","For","example",",","if","you","want","to","know","the","number","of",":","class",":","`","~links.Linear","`","layers","included","in","this","model",",","``","type_name","``","should","be","``","Linear","``",".","If","you","want","to","know","the","number","of",":","class",":","`","~Function","`","classes","or","user-defined","functions","which","have","a","specific","name",",","``","type_name","``","should","be","the","function","name",",","e.g.",",","``","relu","``","or","``","reshape","``",",","etc",".","Args",":","type_name","(","str",")",":","The","class","or","function","name","of","a","layer","you","want","to","enumerate","."]
code: def count_by_layer_type(self, type_name):
      """Count the number of layers by layer type.
  
      This method counts the number of layers which have the name given by
      the argument ``type_name``. For example, if you want to know the number
      of :class:`~links.Linear` layers included in this model, ``type_name``
      should be ``Linear``. If you want to know the number of
      :class:`~Function` classes or user-defined functions which have a
      specific name, ``type_name`` should be the function name, e.g.,
      ``relu`` or ``reshape``, etc.
  
      Args:
          type_name (str): The class or function name of a layer you want to
              enumerate.
  
      """
  
      num = 0
      for layer in self._layers:
          if isinstance(layer, _link.Link):
              if layer.__class__.__name__ == type_name:
                  num += 1
          else:
              if layer.__name__ == type_name:
                  num += 1
      return num
  
imports: import copy
  import inspect
  from chainer import link
label_desc: Use image node_id 23 for calling the Sequential obj's underlying member method code with example usage: obj.count_by_layer_type(type_name) and returns: num