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: Computes the output shape of this layer, given an input shape.
  
  Parameters
  ----------
  input_shape : tuple
      A tuple representing the shape of the input. The tuple should have
      as many elements as there are input dimensions, and the elements
      should be integers or `None`.
  
  Returns
  -------
  tuple
      A tuple representing the shape of the output of this layer. The
      tuple has as many elements as there are output dimensions, and the
      elements are all either integers or `None`.
  
  Notes
  -----
  This method will typically be overridden when implementing a new
  :class:`Layer` class. By default it simply returns the input
  shape. This means that a layer that does not modify the shape
  (e.g. because it applies an elementwise operation) does not need
  to override this method.
docstr_tok: ["Computes","the","output","shape","of","this","layer",",","given","an","input","shape",".","Parameters","--","--","--","--","--","input_shape",":","tuple","A","tuple","representing","the","shape","of","the","input",".","The","tuple","should","have","as","many","elements","as","there","are","input","dimensions",",","and","the","elements","should","be","integers","or","`","None","`",".","Returns","--","--","--","-","tuple","A","tuple","representing","the","shape","of","the","output","of","this","layer",".","The","tuple","has","as","many","elements","as","there","are","output","dimensions",",","and","the","elements","are","all","either","integers","or","`","None","`",".","Notes","--","--","-","This","method","will","typically","be","overridden","when","implementing","a","new",":","class",":","`","Layer","`","class",".","By","default","it","simply","returns","the","input","shape",".","This","means","that","a","layer","that","does","not","modify","the","shape","(","e.g",".","because","it","applies","an","elementwise","operation",")","does","not","need","to","override","this","method","."]
code: def get_output_shape_for(self, input_shape):
      """
      Computes the output shape of this layer, given an input shape.
  
      Parameters
      ----------
      input_shape : tuple
          A tuple representing the shape of the input. The tuple should have
          as many elements as there are input dimensions, and the elements
          should be integers or `None`.
  
      Returns
      -------
      tuple
          A tuple representing the shape of the output of this layer. The
          tuple has as many elements as there are output dimensions, and the
          elements are all either integers or `None`.
  
      Notes
      -----
      This method will typically be overridden when implementing a new
      :class:`Layer` class. By default it simply returns the input
      shape. This means that a layer that does not modify the shape
      (e.g. because it applies an elementwise operation) does not need
      to override this method.
      """
      return input_shape
  
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 4 for calling the Layer obj's underlying member method code with example usage: obj.get_output_shape_for(input_shape) and returns: input_shape