class_docstr: 2D max-pooling layer
  
  Performs 2D max-pooling over the two trailing axes of a 4D input tensor
  (or over axis 1 and 2 if ``dimshuffle=False``, see notes). This is an
  alternative implementation which uses the cuda-convnet wrappers from
  pylearn2: ``pylearn2.sandbox.cuda_convnet.pool.MaxPool``.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or tuple
      The layer feeding into this layer, or the expected input shape.
  
  pool_size : integer or iterable
      The length of the pooling region in each dimension.  If an integer, it
      is promoted to a square pooling region. If an iterable, it should have
      two elements. This layer does not support non-square pooling regions.
  
  stride : integer, iterable or ``None``
      The strides between sucessive pooling regions in each dimension.
      If ``None`` then ``stride = pool_size``. This layer does not support
      using different strides along both axes.
  
  pad : integer or iterable (default: 0)
      This implementation does not support custom padding, so this argument
      must always be set to ``0``. It exists only to make sure the
      interface is compatible with :class:`lasagne.layers.MaxPool2DLayer`.
  
  ignore_border : bool (default: False)
      This implementation always includes partial pooling regions, so this
      argument must always be set to False. It exists only to make sure the
      interface is compatible with :class:`lasagne.layers.MaxPool2DLayer`.
  
  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.
  
  **kwargs
      Any additional keyword arguments are passed to the :class:`Layer`
      superclass.
  
  Notes
  -----
  The cuda-convnet max-pooling implementation has several limitations:
  
  * only square pooling regions are supported.
  * only identical strides in the horizontal and vertical direction are
    supported.
  * only square inputs are supported. (This limitation does not exist for
    the convolution implementation.)
  * partial pooling regions are always included (``ignore_border`` is forced
    to ``False``).
  * custom padding is not supported (``pad`` is forced to ``0``).
  * this layer only works on the GPU.
  
  The cuda-convnet pooling 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 get_output_shape_for(self, input_shape):
      if self.dimshuffle:
          batch_size = input_shape[0]
          num_input_channels = input_shape[1]
          input_rows, input_columns = input_shape[2:4]
      else:
          batch_size = input_shape[3]
          num_input_channels = input_shape[0]
          input_rows, input_columns = input_shape[1:3]
  
      output_rows = pool_output_length(
          input_rows,
          pool_size=self.pool_size,
          stride=self.stride,
          pad=0,
          ignore_border=False,
      )
      output_columns = pool_output_length(
          input_columns,
          pool_size=self.pool_size,
          stride=self.stride,
          pad=0,
          ignore_border=False,
      )
  
      if self.dimshuffle:
          return (
              batch_size,
              num_input_channels,
              output_rows,
              output_columns,
          )
      else:
          return (
              num_input_channels,
              output_rows,
              output_columns,
              batch_size,
          )
  
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 MaxPool2DCCLayer obj's underlying member method code with example usage: obj.get_output_shape_for(input_shape) and returns: batch_size,  num_input_channels,  output_rows,  output_columns, num_input_channels,  output_rows,  output_columns,  batch_size