class_docstr: 2D pooling layer
  
  Performs 2D mean- or max-pooling over the two trailing axes of a 4D input
  tensor. This is an alternative implementation which uses
  ``theano.sandbox.cuda.dnn.dnn_pool`` directly.
  
  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.
  
  stride : integer, iterable or ``None``
      The strides between sucessive pooling regions in each dimension.
      If ``None`` then ``stride = pool_size``.
  
  pad : integer or iterable
      Number of elements to be added on each side of the input
      in each dimension. Each value must be less than
      the corresponding stride.
  
  ignore_border : bool (default: True)
      This implementation never includes partial pooling regions, so this
      argument must always be set to True. It exists only to make sure the
      interface is compatible with :class:`lasagne.layers.MaxPool2DLayer`.
  
  mode : string
      Pooling mode, one of 'max', 'average_inc_pad' or 'average_exc_pad'.
      Defaults to 'max'.
  
  **kwargs
      Any additional keyword arguments are passed to the :class:`Layer`
      superclass.
  
  Notes
  -----
  The value used to pad the input is chosen to be less than
  the minimum of the input, so that the output of each pooling region
  always corresponds to some element in the unpadded input region.
  
  This is a drop-in replacement for :class:`lasagne.layers.MaxPool2DLayer`.
  Its interface is the same, except it does not support the ``ignore_border``
  argument.
class_docstr_tok: ["2D","pooling","layer","Performs","2D","mean-","or","max-pooling","over","the","two","trailing","axes","of","a","4D","input","tensor",".","This","is","an","alternative","implementation","which","uses","``","theano.sandbox.cuda.dnn.dnn_pool","``","directly",".","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",".","stride",":","integer",",","iterable","or","``","None","``","The","strides","between","sucessive","pooling","regions","in","each","dimension",".","If","``","None","``","then","``","stride","=","pool_size","``",".","pad",":","integer","or","iterable","Number","of","elements","to","be","added","on","each","side","of","the","input","in","each","dimension",".","Each","value","must","be","less","than","the","corresponding","stride",".","ignore_border",":","bool","(","default",":","True",")","This","implementation","never","includes","partial","pooling","regions",",","so","this","argument","must","always","be","set","to","True",".","It","exists","only","to","make","sure","the","interface","is","compatible","with",":","class",":","`","lasagne.layers.MaxPool2DLayer","`",".","mode",":","string","Pooling","mode",",","one","of","'max","'",",","'average_inc_pad","'","or","'average_exc_pad","'",".","Defaults","to","'max","'",".","*","*","kwargs","Any","additional","keyword","arguments","are","passed","to","the",":","class",":","`","Layer","`","superclass",".","Notes","--","--","-","The","value","used","to","pad","the","input","is","chosen","to","be","less","than","the","minimum","of","the","input",",","so","that","the","output","of","each","pooling","region","always","corresponds","to","some","element","in","the","unpadded","input","region",".","This","is","a","drop-in","replacement","for",":","class",":","`","lasagne.layers.MaxPool2DLayer","`",".","Its","interface","is","the","same",",","except","it","does","not","support","the","``","ignore_border","``","argument","."]
code: def get_output_shape_for(self, input_shape):
      output_shape = list(input_shape)  # copy / convert to mutable list
  
      output_shape[2] = pool_output_length(
          input_shape[2],
          pool_size=self.pool_size[0],
          stride=self.stride[0],
          pad=self.pad[0],
          ignore_border=True,
      )
  
      output_shape[3] = pool_output_length(
          input_shape[3],
          pool_size=self.pool_size[1],
          stride=self.stride[1],
          pad=self.pad[1],
          ignore_border=True,
      )
  
      return tuple(output_shape)
  
imports: import warnings
  import theano
  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 .normalization import BatchNormLayer
  from ..utils import as_tuple
label_desc: Use image node_id 2 for calling the Pool2DDNNLayer obj's underlying member method code with example usage: obj.get_output_shape_for(input_shape) and returns: tuple