class_docstr: Global pooling layer.
  
  Parameters
  ----------
  function : {{``avg``, ``max``, ``sum``}} or callable
      Common functions has been predefined for the user.
      These options are available:
  
      - ``avg`` - For average global pooling. The same as
        ``tf.reduce_mean``.
  
      - ``max`` - For max global pooling. The same as
        ``tf.reduce_max``.
  
      - ``sum`` - For sum global pooling. The same as
        ``tf.reduce_sum``.
  
      Parameter also excepts custom functions that have
      following format.
  
      .. code-block:: python
  
          def agg_func(x, axis=None):
              pass
  
      Defaults to ``avg``.
  
  {BaseLayer.name}
  
  Methods
  -------
  {BaseLayer.Methods}
  
  Attributes
  ----------
  {BaseLayer.Attributes}
  
  Examples
  --------
  >>> from neupy.layers import *
  >>> network = Input((4, 4, 16)) >> GlobalPooling('avg')
  (?, 4, 4, 16) -> [... 2 layers ...] -> (?, 16)
class_docstr_tok: ["Global","pooling","layer",".","Parameters","--","--","--","--","--","function",":","{","{","``","avg","``",",","``","max","``",",","``","sum","``","}","}","or","callable","Common","functions","has","been","predefined","for","the","user",".","These","options","are","available",":","-","``","avg","``","-","For","average","global","pooling",".","The","same","as","``","tf.reduce_mean","``",".","-","``","max","``","-","For","max","global","pooling",".","The","same","as","``","tf.reduce_max","``",".","-","``","sum","``","-","For","sum","global","pooling",".","The","same","as","``","tf.reduce_sum","``",".","Parameter","also","excepts","custom","functions","that","have","following","format",".","..","code-block",":",":","python","def","agg_func","(","x",",","axis=None",")",":","pass","Defaults","to","``","avg","``",".","{","BaseLayer.name","}","Methods","--","--","--","-","{","BaseLayer.Methods","}","Attributes","--","--","--","--","--","{","BaseLayer.Attributes","}","Examples","--","--","--","--",">",">",">","from","neupy.layers","import","*",">",">",">","network","=","Input","(","(","4",",","4",",","16",")",")",">",">","GlobalPooling","(","'avg","'",")","(","?",",","4",",","4",",","16",")","-",">","[","...","2","layers","...","]","-",">","(","?",",","16",")"]
code: def __repr__(self):
      return self._repr_arguments(
          repr(self.original_function), name=self.name
      )
  
imports: from __future__ import division
  import math
  import tensorflow
  from neupy.utils import as_tuple, tf_utils
  from neupy.core.properties import TypedListProperty, ChoiceProperty, FunctionWithOptionsProperty
  from neupy.exceptions import LayerConnectionError
  from .base import BaseLayer
  from .convolutions import Spatial2DProperty
label_desc: Use image node_id 4 for calling the GlobalPooling obj's underlying member method code with example usage: obj.__repr__() and returns: self