class_docstr: Applies global average pooling operation for spatial data.
  The input of this layer should be 4D.
  
  When you use this layer as the first layer of a model, you need to provide the argument
  input_shape (a shape tuple, does not include the batch dimension).
  
  # Arguments
  data_format: Format of input data. Either channels_first  or channels_last.
  
  input_shape: A shape tuple, not including batch.
  name: String to set the name of the layer.
        If not specified, its name will by default to be a generated string.
  
  >>> globalaveragepooling2d = GlobalAveragePooling2D(input_shape=(4, 32, 32))
  creating: createZooKeras2GlobalAveragePooling2D
class_docstr_tok: ["Applies","global","average","pooling","operation","for","spatial","data",".","The","input","of","this","layer","should","be","4D",".","When","you","use","this","layer","as","the","first","layer","of","a","model",",","you","need","to","provide","the","argument","input_shape","(","a","shape","tuple",",","does","not","include","the","batch","dimension",")",".","#","Arguments","data_format",":","Format","of","input","data",".","Either","channels_first","or","channels_last",".","input_shape",":","A","shape","tuple",",","not","including","batch",".","name",":","String","to","set","the","name","of","the","layer",".","If","not","specified",",","its","name","will","by","default","to","be","a","generated","string",".",">",">",">","globalaveragepooling2d","=","GlobalAveragePooling2D","(","input_shape=","(","4",",","32",",","32",")",")","creating",":","createZooKeras2GlobalAveragePooling2D"]
code: def __init__(
      self, data_format="channels_first", input_shape=None, **kwargs
  ):
      super(GlobalAveragePooling2D, self).__init__(
          None,
          data_format,
          list(input_shape) if input_shape else None,
          **kwargs,
      )
  
file_path: analytics-zoo/pyzoo/zoo/pipeline/api/keras2/layers/pooling.py
imports: import sys
  from zoo.pipeline.api.keras2.base import ZooKeras2Layer
label_desc: Use image node_id 1 to create a new GlobalAveragePooling2D object from inherited base classes: ZooKeras2Layer with example: obj = GlobalAveragePooling2D(data_format, input_shape)