parameters: (self, input_layer, pool_size, feature_dim=1, implementation='max_pool')
docstring: pool_size: the number of inputs to be pooled together.
  
          feature_dim: the dimension of the input to pool across. By default this is 1
          for both dense and convolutional layers (bc01).
          For c01b, this has to be set to 0.
  
          implementation:
              - 'max_pool': uses theano's max_pool_2d - doesn't work for input dimension > 1024!
              - 'reshape': reshapes the tensor to create a 'pool' dimension and then uses T.max.
docstring_summary: pool_size: the number of inputs to be pooled together.
docstring_tokens: pool_size : the number of inputs to be pooled together .
function: def __init__(self, input_layer, pool_size, feature_dim=1, implementation='max_pool'):
          """
          pool_size: the number of inputs to be pooled together.
  
          feature_dim: the dimension of the input to pool across. By default this is 1
          for both dense and convolutional layers (bc01).
          For c01b, this has to be set to 0.
  
          implementation:
              - 'max_pool': uses theano's max_pool_2d - doesn't work for input dimension > 1024!
              - 'reshape': reshapes the tensor to create a 'pool' dimension and then uses T.max.
          """
          self.pool_size = pool_size
          self.feature_dim = feature_dim
          self.implementation = implementation
          self.input_layer = input_layer
          self.input_shape = self.input_layer.get_output_shape()
          self.mb_size = self.input_layer.mb_size
  
          if self.input_shape[self.feature_dim] % self.pool_size != 0:
              raise "Feature dimension is not a multiple of the pool size. Doesn't work!"
  
          self.params = []
          self.bias_params = []
function_tokens: def __init__ ( self , input_layer , pool_size , feature_dim = 1 , implementation = 'max_pool' ) : self . pool_size = pool_size self . feature_dim = feature_dim self . implementation = implementation self . input_layer = input_layer self . input_shape = self . input_layer . get_output_shape ( ) self . mb_size = self . input_layer . mb_size if self . input_shape [ self . feature_dim ] % self . pool_size != 0 : raise "Feature dimension is not a multiple of the pool size. Doesn't work!" self . params = [ ] self . bias_params = [ ]