parameters: (self, layer)
return_statement: return layer
docstring: Track a Layer in this Network.
  
      `Network` requires that all `Layer`s used in `call()` be tracked so that the
      `Network` can export a complete list of variables.
  
      Args:
        layer: A `tf.layers.Layer` object.
  
      Returns:
        The passed in `layer`.
  
      Raises:
        RuntimeError: If __init__ has not been called.
        TypeError: If `layer` is the wrong type.
        ValueError: If a `Layer` with the same name has already been added.
docstring_summary: Track a Layer in this Network.
docstring_tokens: Track a Layer in this Network .
function: def track_layer(self, layer):
      """Track a Layer in this Network.
  
      `Network` requires that all `Layer`s used in `call()` be tracked so that the
      `Network` can export a complete list of variables.
  
      Args:
        layer: A `tf.layers.Layer` object.
  
      Returns:
        The passed in `layer`.
  
      Raises:
        RuntimeError: If __init__ has not been called.
        TypeError: If `layer` is the wrong type.
        ValueError: If a `Layer` with the same name has already been added.
      """
      if not hasattr(self, "_layers"):
        raise RuntimeError("Need to call Network.__init__ before adding layers")
      if not isinstance(layer, base.Layer):
        raise TypeError(
            "Network.track_layer() passed type %s, not a tf.layers.Layer" %
            (type(layer),))
      if layer.name in self._layers:
        if self._layers[layer.name] is layer:
          return layer
        raise ValueError(
            "Attempt to add two Layers with the name '%s' to the same Network "
            "'%s'" % (layer.name, self.name))
      self._layers[layer.name] = layer
      return layer
function_tokens: def track_layer ( self , layer ) : if not hasattr ( self , "_layers" ) : raise RuntimeError ( "Need to call Network.__init__ before adding layers" ) if not isinstance ( layer , base . Layer ) : raise TypeError ( "Network.track_layer() passed type %s, not a tf.layers.Layer" % ( type ( layer ) , ) ) if layer . name in self . _layers : if self . _layers [ layer . name ] is layer : return layer raise ValueError ( "Attempt to add two Layers with the name '%s' to the same Network " "'%s'" % ( layer . name , self . name ) ) self . _layers [ layer . name ] = layer return layer