class_docstr: The class :class:`LayerList` is a linear stack of layers.
  
  The :class:`LayerList` can be created by passing a list of layer instances.
  The given layer instances will be automatically connected one by one.
  
  Parameters
  ----------
  layers: list of Layer
      A list of layers.
  name : str or None
      A unique layer name. If None, a unique name will be automatically assigned.
  
  Methods
  ---------
  __init__()
      Initializing the LayerList.
  weights()
      A collection of weights of all the layer instances.
  build()
      Build the LayerList. The layer instances will be connected automatically one by one.
  forward()
      Forward the computation. The computation will go through all layer instances.
class_docstr_tok: ["The","class",":","class",":","`","LayerList","`","is","a","linear","stack","of","layers",".","The",":","class",":","`","LayerList","`","can","be","created","by","passing","a","list","of","layer","instances",".","The","given","layer","instances","will","be","automatically","connected","one","by","one",".","Parameters","--","--","--","--","--","layers",":","list","of","Layer","A","list","of","layers",".","name",":","str","or","None","A","unique","layer","name",".","If","None",",","a","unique","name","will","be","automatically","assigned",".","Methods","--","--","--","--","-","__init__","(",")","Initializing","the","LayerList",".","weights","(",")","A","collection","of","weights","of","all","the","layer","instances",".","build","(",")","Build","the","LayerList",".","The","layer","instances","will","be","connected","automatically","one","by","one",".","forward","(",")","Forward","the","computation",".","The","computation","will","go","through","all","layer","instances","."]
docstr: Initializing the LayerList given a list of Layer.
  
  :param layers: list of Layer
  :param name: str or None
code: def __init__(self, layers, name=None):
      """
      Initializing the LayerList given a list of Layer.
  
      :param layers: list of Layer
      :param name: str or None
      """
  
      super(LayerList, self).__init__(name=name)
      self.layers = layers
  
      is_built = True
      for layer in self.layers:
          self._trainable_weights.extend(layer.trainable_weights)
          self._nontrainable_weights.extend(layer.nontrainable_weights)
          if layer._built is False:
              is_built = False
          if layer._built and layer.all_weights is not None:
              # some layers in the list passed in have already been built
              # e.g. using input shape to construct layers in dynamic eager
              if self._all_weights is None:
                  self._all_weights = list()
              self._all_weights.extend(layer.all_weights)
      if is_built:
          self._built = True
  
      logging.info(
          "LayerList %s including layers [%s]"
          % (
              self.name,
              ", ".join([layer.name for layer in self.layers]),
          )
      )
  
      # check layer name uniqueness in LayerList
      local_layer_name_set = set()
      for layer in self.layers:
          if layer.name not in local_layer_name_set:
              local_layer_name_set.add(layer.name)
          else:
              raise ValueError(
                  "Layer name '%s' has already been used by another layer. Please change the layer name."
                  % layer.name
              )
  
imports: import inspect
  from abc import abstractmethod
  import tensorflow
  import tensorlayer
  from tensorlayer import logging
  from tensorlayer.decorators import deprecated_alias, private_method, protected_method
  from tensorlayer.files import utils
  from tensorlayer.layers.utils import get_variable_with_initializer, list_remove_repeat
label_desc: Use image node_id 1 to create a new LayerList object from inherited base classes: Layer with example: obj = LayerList(layers, name)