class_docstr: The :class:`Layer` class represents a single layer of a neural network. It
  should be subclassed when implementing new types of layers.
  
  Because each layer can keep track of the layer(s) feeding into it, a
  network's output :class:`Layer` instance can double as a handle to the full
  network.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or a tuple
      The layer feeding into this layer, or the expected input shape.
  name : a string or None
      An optional name to attach to this layer.
class_docstr_tok: ["The",":","class",":","`","Layer","`","class","represents","a","single","layer","of","a","neural","network",".","It","should","be","subclassed","when","implementing","new","types","of","layers",".","Because","each","layer","can","keep","track","of","the","layer","(","s",")","feeding","into","it",",","a","network","'s","output",":","class",":","`","Layer","`","instance","can","double","as","a","handle","to","the","full","network",".","Parameters","--","--","--","--","--","incoming",":","a",":","class",":","`","Layer","`","instance","or","a","tuple","The","layer","feeding","into","this","layer",",","or","the","expected","input","shape",".","name",":","a","string","or","None","An","optional","name","to","attach","to","this","layer","."]
docstr: Returns a list of Theano shared variables or expressions that
  parameterize the layer.
  
  By default, all shared variables that participate in the forward pass
  will be returned (in the order they were registered in the Layer's
  constructor via :meth:`add_param()`). The list can optionally be
  filtered by specifying tags as keyword arguments. For example,
  ``trainable=True`` will only return trainable parameters, and
  ``regularizable=True`` will only return parameters that can be
  regularized (e.g., by L2 decay).
  
  If any of the layer's parameters was set to a Theano expression instead
  of a shared variable, `unwrap_shared` controls whether to return the
  shared variables involved in that expression (``unwrap_shared=True``,
  the default), or the expression itself (``unwrap_shared=False``). In
  either case, tag filtering applies to the expressions, considering all
  variables within an expression to be tagged the same.
  
  Parameters
  ----------
  unwrap_shared : bool (default: True)
      Affects only parameters that were set to a Theano expression. If
      ``True`` the function returns the shared variables contained in
      the expression, otherwise the Theano expression itself.
  
  **tags (optional)
      tags can be specified to filter the list. Specifying ``tag1=True``
      will limit the list to parameters that are tagged with ``tag1``.
      Specifying ``tag1=False`` will limit the list to parameters that
      are not tagged with ``tag1``. Commonly used tags are
      ``regularizable`` and ``trainable``.
  
  Returns
  -------
  list of Theano shared variables or expressions
      A list of variables that parameterize the layer
  
  Notes
  -----
  For layers without any parameters, this will return an empty list.
docstr_tok: ["Returns","a","list","of","Theano","shared","variables","or","expressions","that","parameterize","the","layer",".","By","default",",","all","shared","variables","that","participate","in","the","forward","pass","will","be","returned","(","in","the","order","they","were","registered","in","the","Layer's","constructor","via",":","meth",":","`","add_param","(",")","`",")",".","The","list","can","optionally","be","filtered","by","specifying","tags","as","keyword","arguments",".","For","example",",","``","trainable=True","``","will","only","return","trainable","parameters",",","and","``","regularizable=True","``","will","only","return","parameters","that","can","be","regularized","(","e.g.",",","by","L2","decay",")",".","If","any","of","the","layer","'s","parameters","was","set","to","a","Theano","expression","instead","of","a","shared","variable",",","`","unwrap_shared","`","controls","whether","to","return","the","shared","variables","involved","in","that","expression","(","``","unwrap_shared=True","``",",","the","default",")",",","or","the","expression","itself","(","``","unwrap_shared=False","``",")",".","In","either","case",",","tag","filtering","applies","to","the","expressions",",","considering","all","variables","within","an","expression","to","be","tagged","the","same",".","Parameters","--","--","--","--","--","unwrap_shared",":","bool","(","default",":","True",")","Affects","only","parameters","that","were","set","to","a","Theano","expression",".","If","``","True","``","the","function","returns","the","shared","variables","contained","in","the","expression",",","otherwise","the","Theano","expression","itself",".","*","*","tags","(","optional",")","tags","can","be","specified","to","filter","the","list",".","Specifying","``","tag1=True","``","will","limit","the","list","to","parameters","that","are","tagged","with","``","tag1","``",".","Specifying","``","tag1=False","``","will","limit","the","list","to","parameters","that","are","not","tagged","with","``","tag1","``",".","Commonly","used","tags","are","``","regularizable","``","and","``","trainable","``",".","Returns","--","--","--","-","list","of","Theano","shared","variables","or","expressions","A","list","of","variables","that","parameterize","the","layer","Notes","--","--","-","For","layers","without","any","parameters",",","this","will","return","an","empty","list","."]
code: def get_params(self, unwrap_shared=True, **tags):
      """
      Returns a list of Theano shared variables or expressions that
      parameterize the layer.
  
      By default, all shared variables that participate in the forward pass
      will be returned (in the order they were registered in the Layer's
      constructor via :meth:`add_param()`). The list can optionally be
      filtered by specifying tags as keyword arguments. For example,
      ``trainable=True`` will only return trainable parameters, and
      ``regularizable=True`` will only return parameters that can be
      regularized (e.g., by L2 decay).
  
      If any of the layer's parameters was set to a Theano expression instead
      of a shared variable, `unwrap_shared` controls whether to return the
      shared variables involved in that expression (``unwrap_shared=True``,
      the default), or the expression itself (``unwrap_shared=False``). In
      either case, tag filtering applies to the expressions, considering all
      variables within an expression to be tagged the same.
  
      Parameters
      ----------
      unwrap_shared : bool (default: True)
          Affects only parameters that were set to a Theano expression. If
          ``True`` the function returns the shared variables contained in
          the expression, otherwise the Theano expression itself.
  
      **tags (optional)
          tags can be specified to filter the list. Specifying ``tag1=True``
          will limit the list to parameters that are tagged with ``tag1``.
          Specifying ``tag1=False`` will limit the list to parameters that
          are not tagged with ``tag1``. Commonly used tags are
          ``regularizable`` and ``trainable``.
  
      Returns
      -------
      list of Theano shared variables or expressions
          A list of variables that parameterize the layer
  
      Notes
      -----
      For layers without any parameters, this will return an empty list.
      """
      result = list(self.params.keys())
  
      only = set(tag for tag, value in tags.items() if value)
      if only:
          # retain all parameters that have all of the tags in `only`
          result = [
              param
              for param in result
              if not (only - self.params[param])
          ]
  
      exclude = set(tag for tag, value in tags.items() if not value)
      if exclude:
          # retain all parameters that have none of the tags in `exclude`
          result = [
              param
              for param in result
              if not (self.params[param] & exclude)
          ]
  
      if unwrap_shared:
          return utils.collect_shared_vars(result)
      else:
          return result
  
file_path: Lasagne/lasagne/layers/base.py
imports: from collections import OrderedDict
  import theano.tensor
  from ..None import utils
label_desc: Use image node_id 3 for calling the Layer obj's underlying member method code with example usage: obj.get_params(unwrap_shared) and returns: utils, result