class_docstr: lasagne.layers.Conv2DCCLayer(incoming, num_filters, filter_size,
  stride=(1, 1), pad=0, untie_biases=False, W=None,
  b=lasagne.init.Constant(0.), nonlinearity=lasagne.nonlinearities.rectify,
  dimshuffle=True, flip_filters=False, partial_sum=1, **kwargs)
  
  2D convolutional layer
  
  Performs a 2D convolution on its input and optionally adds a bias and
  applies an elementwise nonlinearity.  This is an alternative implementation
  which uses the cuda-convnet wrappers from pylearn2:
  ``pylearn2.sandbox.cuda_convnet.filter_acts.FilterActs``.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or a tuple
      The layer feeding into this layer, or the expected input shape. This
      layer expects a 4D tensor as its input, with shape
      ``(batch_size, num_input_channels, input_rows, input_columns)``.
      If automatic dimshuffling is disabled (see notes), the shape should be
      ``(num_input_channels, input_rows, input_columns, batch_size)``
      instead (c01b axis order).
  
  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.
      This layer does not support non-square filters.
  
  stride : int or iterable of int
      An integer or a 2-element tuple specifying the stride of the
      convolution operation. This layer does not support using different
      strides along both axes.
  
  pad : int, iterable of int, 'full', 'same' or 'valid' (default: 0)
      By default, the convolution is only computed where the input and the
      filter fully overlap (a valid convolution). When ``stride=1``, this
      yields an output that is smaller than the input by ``filter_size - 1``.
      The `pad` argument allows you to implicitly pad the input with zeros,
      extending the output size.
  
      A single integer results in symmetric zero-padding of the given size on
      all borders. This layer does not support using different amounts of
      padding along both axes, but for compatibility to other layers you can
      still specify the padding as a tuple of two same-valued integers.
  
      ``'full'`` pads with one less than the filter size on both sides. This
      is equivalent to computing the convolution wherever the input and the
      filter overlap by at least one position.
  
      ``'same'`` pads with half the filter size (rounded down) on both sides.
      When ``stride=1`` this results in an output size equal to the input
      size. Even filter size is not supported.
  
      ``'valid'`` is an alias for ``0`` (no padding / a valid convolution).
  
      Note that ``'full'`` and ``'same'`` can be faster than equivalent
      integer values due to optimizations by Theano.
  
  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.
      These should be a 4D tensor with shape
      ``(num_filters, num_input_channels, filter_rows, filter_columns)``.
      If automatic dimshuffling is disabled (see notes), the shape should be
      ``(num_input_channels, input_rows, input_columns, num_filters)``
      instead (c01b axis order).
      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.
  
  dimshuffle : bool (default: True)
      If ``True``, the layer will automatically apply the necessary
      dimshuffle operations to deal with the fact that the cuda-convnet
      implementation uses c01b (batch-size-last) axis order instead of bc01
      (batch-size-first), which is the Lasagne/Theano default. This makes the
      layer interoperable with other Lasagne layers.
  
      If ``False``, this automatic dimshuffling is disabled and the layer
      will expect its input and parameters to have c01b axis order. It is up
      to the user to ensure this. :class:`ShuffleBC01ToC01BLayer` and
      :class:`ShuffleC01BToBC01Layer` can be used to convert between bc01 and
      c01b axis order.
  
  flip_filters : bool (default: False)
      Whether to flip the filters and perform a convolution, or not to flip
      them and perform a correlation. Flipping adds a bit of overhead, so it
      is disabled by default. In most cases this does not make a difference
      anyway because the filters are learnt. However, ``flip_filters`` should
      be set to ``True`` if weights are loaded into it that were learnt using
      a regular :class:`lasagne.layers.Conv2DLayer`, for example.
  
  partial_sum : int or None (default: 1)
      This value tunes the trade-off between memory usage and performance.
      You can specify any positive integer that is a divisor of the output
      feature map size (i.e. output rows times output columns). Higher
      values decrease memory usage, but also performance. Specifying 0 or
      ``None`` means the highest possible value will be used. The Lasagne
      default of ``1`` gives the best performance, but also the highest
      memory usage.
  
      More information about this parameter can be found in the
      `cuda-convnet documentation
      <https://code.google.com/p/cuda-convnet/wiki/LayerParams>`_.
  
  **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
  -----
  The cuda-convnet convolution implementation has several limitations:
  
  * only square filters are supported.
  * only identical strides in the horizontal and vertical direction are
    supported.
  * the number of filters must be a multiple of 16.
  * the number of input channels must be even, or less than or equal to
    3.
  * if the gradient w.r.t. the input is to be computed, the number of
    channels must be divisible by 4.
  * performance is optimal when the batch size is a multiple of 128 (but
    other batch sizes are supported).
  * this layer only works on the GPU.
  
  The cuda-convnet convolution implementation uses c01b (batch-size-last)
  axis order by default. The Theano/Lasagne default is bc01
  (batch-size-first). This layer automatically adds the necessary dimshuffle
  operations for the input and the parameters so that it is interoperable
  with other layers that assume bc01 axis order. However, these additional
  dimshuffle operations may sometimes negatively affect performance. For this
  reason, it is possible to disable them by setting ``dimshuffle=False``. In
  this case, the user is expected to manually ensure that the input and
  parameters have the correct axis order. :class:`ShuffleBC01ToC01BLayer` and
  :class:`ShuffleC01BToBC01Layer` can be used to convert between bc01 and
  c01b axis order.
code: def num_input_channels(self):
      if self.dimshuffle:
          return self.input_shape[1]
      else:
          return self.input_shape[0]
  
imports: import warnings
  import numpy
  import theano
  import theano.tensor
  from ..None import init
  from ..None import nonlinearities
  from .base import Layer
  from .conv import conv_output_length, BaseConvLayer
  from .pool import pool_output_length
  from ..utils import as_tuple
  from theano.sandbox.cuda.basic_ops import gpu_contiguous
  from pylearn2.sandbox.cuda_convnet.filter_acts import FilterActs
label_desc: Use image node_id 2 for calling the Conv2DCCLayer obj's underlying member method code with example usage: obj.num_input_channels() and returns: self, self