class_docstr: lasagne.layers.LocallyConnected2DLayer(incoming, num_filters, filter_size,
  stride=(1, 1), pad='same', untie_biases=False,
  W=lasagne.init.GlorotUniform(), b=lasagne.init.Constant(0.),
  nonlinearity=lasagne.nonlinearities.rectify, flip_filters=True,
  channelwise=False, **kwargs)
  
  2D locally connected layer
  
  Performs an operation similar to a 2D convolution but without the weight
  sharing, then optionally adds a bias and applies an elementwise
  nonlinearity.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or a tuple
      The layer feeding into this layer, or the expected input shape. The
      output of this layer should be a 4D tensor, with shape
      ``(batch_size, num_input_channels, input_rows, input_columns)``.
  
  num_filters : int
      The number of learnable convolutional filters this layer has.
  
  filter_size : int or iterable of int
      An integer or a 2-element tuple specifying the size of the filters.
  
  stride : int or iterable of int
      An integer or a 2-element tuple specifying the stride of the
      convolution operation.
      This implementation only supports unit stride, the argument is
      provided for compatibility to convolutional layers only.
  
  pad : int, iterable of int, or 'valid' (default: 'same')
      The amount of implicit zero padding of the input.
      This implementation only supports 'same' padding, the argument is
      provided for compatibility to other convolutional layers only.
  
  untie_biases : bool (default: False)
      If ``False``, the layer will have a bias parameter for each channel,
      which is shared across all positions in this channel. As a result, the
      `b` attribute will be a vector (1D).
  
      If True, the layer will have separate bias parameters for each
      position in each channel. As a result, the `b` attribute will be a
      3D tensor.
  
  W : Theano shared variable, expression, numpy array or callable
      Initial value, expression or initializer for the weights.
      If ``channelwise`` is set to ``False``, the weights should be a 6D
      tensor with shape ``(num_filters, num_input_channels, filter_rows,
      filter_columns, output_rows, output_columns)``. If ``channelwise`` is
      set to ``True``, the weights should be a 5D tensor with shape
      ``(num_filters, filter_rows, filter_columns, output_rows,
      output_columns)``.
      See :func:`lasagne.utils.create_param` for more information.
  
  b : Theano shared variable, expression, numpy array, callable or ``None``
      Initial value, expression or initializer for the biases. If set to
      ``None``, the layer will have no biases. Otherwise, biases should be
      a 1D array with shape ``(num_filters,)`` if `untied_biases` is set to
      ``False``. If it is set to ``True``, its shape should be
      ``(num_filters, output_rows, output_columns)`` instead.
      See :func:`lasagne.utils.create_param` for more information.
  
  nonlinearity : callable or None
      The nonlinearity that is applied to the layer activations. If None
      is provided, the layer will be linear.
  
  flip_filters : bool (default: True)
      Whether to flip the filters before multiplying them over the input,
      similar to a convolution (this is the default), or not to flip them,
      similar to a correlation.
  
  channelwise : bool (default: False)
      If ``False``, each filter interacts will all of the input channels as
      in a convolution. If ``True``, each filter only interacts with the
      corresponding input channel. That is, each output channel only depends
      on its filter and on the input channel at the same channel index.
      In this case, the number of output channels (i.e. number of filters)
      should be equal to the number of input channels.
  
  **kwargs
      Any additional keyword arguments are passed to the `Layer` superclass.
  
  Attributes
  ----------
  W : Theano shared variable or expression
      Variable or expression representing the filter weights.
  
  b : Theano shared variable or expression
      Variable or expression representing the biases.
  
  Notes
  -----
  This implementation computes the output tensor by iterating over the filter
  weights and multiplying them with shifted versions of the input tensor.
  This implementation assumes no stride, 'same' padding and no dilation.
  
  Raises
  ------
  ValueError
      When ``channelwise`` is set to ``True`` and the number of filters
      differs from the number of input channels, a `ValueError` is raised.
code: def get_W_shape(self):
      if any(s is None for s in self.input_shape[1:]):
          raise ValueError(
              "A LocallyConnected2DLayer requires a fixed input shape "
              "(except for the batch size). Got %r."
              % (self.input_shape,)
          )
      num_input_channels = self.input_shape[1]
      output_shape = self.get_output_shape_for(self.input_shape)
      if self.channelwise:
          if (
              self.channelwise
              and self.num_filters != num_input_channels
          ):
              raise ValueError(
                  "num_filters and the number of input "
                  "channels should match when channelwise is "
                  "true, but got num_filters=%r and %d input "
                  "channels" % (self.num_filters, num_input_channels)
              )
          return (
              (self.num_filters,) + self.filter_size + output_shape[-2:]
          )
      else:
          return (
              (self.num_filters, num_input_channels)
              + self.filter_size
              + output_shape[-2:]
          )
  
file_path: Lasagne/lasagne/layers/local.py
imports: import theano.tensor
  from ..None import init
  from ..None import nonlinearities
  from .conv import Conv2DLayer
label_desc: Use image node_id 2 for calling the LocallyConnected2DLayer obj's underlying member method code with example usage: obj.get_W_shape() and returns: unknown, unknown