class_docstr: 'Winner Take All' layer
  
  This layer performs 'Winner Take All' (WTA) across feature maps: zero out
  all but the maximal activation value within a region.
  
  Parameters
  ----------
  incoming : a :class:`Layer` instance or tuple
      The layer feeding into this layer, or the expected input shape.
  
  pool_size : integer
      the number of feature maps per region.
  
  axis : integer
      the axis along which the regions are formed.
  
  **kwargs
      Any additional keyword arguments are passed to the :class:`Layer`
      superclass.
  
  Notes
  -----
  This layer requires that the size of the axis along which it groups units
  is a multiple of the pool size.
class_docstr_tok: ["'Winner","Take","All","'","layer","This","layer","performs","'Winner","Take","All","'","(","WTA",")","across","feature","maps",":","zero","out","all","but","the","maximal","activation","value","within","a","region",".","Parameters","--","--","--","--","--","incoming",":","a",":","class",":","`","Layer","`","instance","or","tuple","The","layer","feeding","into","this","layer",",","or","the","expected","input","shape",".","pool_size",":","integer","the","number","of","feature","maps","per","region",".","axis",":","integer","the","axis","along","which","the","regions","are","formed",".","*","*","kwargs","Any","additional","keyword","arguments","are","passed","to","the",":","class",":","`","Layer","`","superclass",".","Notes","--","--","-","This","layer","requires","that","the","size","of","the","axis","along","which","it","groups","units","is","a","multiple","of","the","pool","size","."]
code: def get_output_for(self, input, **kwargs):
      num_feature_maps = input.shape[self.axis]
      num_pools = num_feature_maps // self.pool_size
  
      pool_shape = ()
      arange_shuffle_pattern = ()
      for k in range(self.axis):
          pool_shape += (input.shape[k],)
          arange_shuffle_pattern += ("x",)
  
      pool_shape += (num_pools, self.pool_size)
      arange_shuffle_pattern += ("x", 0)
  
      for k in range(self.axis + 1, input.ndim):
          pool_shape += (input.shape[k],)
          arange_shuffle_pattern += ("x",)
  
      input_reshaped = input.reshape(pool_shape)
      max_indices = T.argmax(
          input_reshaped, axis=self.axis + 1, keepdims=True
      )
  
      arange = T.arange(self.pool_size).dimshuffle(
          *arange_shuffle_pattern
      )
      mask = T.eq(max_indices, arange).reshape(input.shape)
  
      return input * mask
  
imports: import theano.tensor
  from .base import Layer
  from ..utils import as_tuple
label_desc: Use image node_id 2 for calling the FeatureWTALayer obj's underlying member method code with example usage: obj.get_output_for(input) and returns: unknown