global_avg_pool2d

tfsnippet.layers.global_avg_pool2d(*args, **kwargs)

2D global average pooling over spatial dimensions.

Parameters:
  • input (Tensor) – The input tensor, at least 4-d.
  • channels_last (bool) – Whether or not the channel axis is the last axis in input? (i.e., the data format is “NHWC”)
  • keepdims (bool) – Whether or not to keep the reduced spatial dimensions? Default is False.
  • name (str) – Default name of the name scope. If not specified, generate one according to the method name.
Returns:

The output tensor.

Return type:

tf.Tensor