GlobalMeanPool2d

class dragon.vm.tensorlayer.layers.GlobalMeanPool2d(
  data_format='channels_first',
  name=None
)[source]

The global mean 2d pooling layer.

Examples:

x = tl.layers.Input([None, 30, 100, 100])
y = tl.layers.GlobalMeanPool2d()(x)
Parameters:
  • data_format ({'channels_last', 'channels_first'}, optional) – The optional data format.
  • name (str, optional) – The optional layer name.

__init__

GlobalMeanPool2d.__init__(
  data_format='channels_first',
  name=None
)[source]

Create a new Layer.

Parameters:
  • name (str, optional.) – The optional layer name.
  • act (str or function, optional) – The optional activation.