class_docstr: 3D pooling layer
  
  Performs 3D mean or max-pooling over the three trailing axes
  of a 5D input tensor.
  
  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 cubic pooling region. If an iterable, it should have
      three 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
      If ``True``, partial pooling regions will be ignored.
      Must be ``True`` if ``pad != (0, 0, 0)``.
  
  mode : {'max', 'average_inc_pad', 'average_exc_pad'}
      Pooling mode: max-pooling or mean-pooling including/excluding zeros
      from partially padded pooling regions. Default is 'max'.
  
  **kwargs
      Any additional keyword arguments are passed to the :class:`Layer`
      superclass.
  
  See Also
  --------
  MaxPool3DLayer : Shortcut for max pooling layer.
  
  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.
  
  Using ``ignore_border=False`` prevents Theano from using cuDNN for the
  operation, so it will fall back to a slower implementation.
class_docstr_tok: ["3D","pooling","layer","Performs","3D","mean","or","max-pooling","over","the","three","trailing","axes","of","a","5D","input","tensor",".","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","cubic","pooling","region",".","If","an","iterable",",","it","should","have","three","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","If","``","True","``",",","partial","pooling","regions","will","be","ignored",".","Must","be","``","True","``","if","``","pad","!","=","(","0",",","0",",","0",")","``",".","mode",":","{","'max","'",",","'average_inc_pad","'",",","'average_exc_pad","'","}","Pooling","mode",":","max-pooling","or","mean-pooling","including\/excluding","zeros","from","partially","padded","pooling","regions",".","Default","is","'max","'",".","*","*","kwargs","Any","additional","keyword","arguments","are","passed","to","the",":","class",":","`","Layer","`","superclass",".","See","Also","--","--","--","--","MaxPool3DLayer",":","Shortcut","for","max","pooling","layer",".","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",".","Using","``","ignore_border=False","``","prevents","Theano","from","using","cuDNN","for","the","operation",",","so","it","will","fall","back","to","a","slower","implementation","."]
code: def __init__(
      self,
      incoming,
      pool_size,
      stride=None,
      pad=(0, 0, 0),
      ignore_border=True,
      mode="max",
      **kwargs,
  ):
      super(Pool3DLayer, self).__init__(incoming, **kwargs)
  
      self.pool_size = as_tuple(pool_size, 3)
  
      if len(self.input_shape) != 5:
          raise ValueError(
              "Tried to create a 3D pooling layer with "
              "input shape %r. Expected 5 input dimensions "
              "(batchsize, channels, 3 spatial dim)."
              % (self.input_shape,)
          )
  
      if stride is None:
          self.stride = self.pool_size
      else:
          self.stride = as_tuple(stride, 3)
  
      self.pad = as_tuple(pad, 3)
  
      self.ignore_border = ignore_border
      self.mode = mode
  
imports: import theano.tensor
  from .base import Layer
  from ..utils import as_tuple
label_desc: Use image node_id 1 to create a new Pool3DLayer object from inherited base classes: Layer with example: obj = Pool3DLayer(incoming, pool_size, stride, pad, ignore_border, mode)