MeanPool2d

class dragon.vm.tensorlayer.layers.MeanPool2d(
  filter_size=3,
  strides=2,
  padding='SAME',
  data_format='channels_first',
  name=None
)[source]

The mean 2d pooling layer.

Examples:

x = tl.layers.Input([None, 32, 50, 50])
y = tl.layers.MeanPool2d(filter_size=3, strides=2)(x)
Parameters:
  • filter_size (Sequence[int]) – The size of sliding window.
  • strides (Sequence[int]) – The stride of sliding window.
  • padding (Union[{'VALID', 'SAME'}, Sequence[int]]) – The padding algorithm or padding sizes.
  • data_format ({'channels_last', 'channels_first'}, optional) – The optional data format.
  • name (str, optional) – The optional name.

__init__

MeanPool2d.__init__(
  filter_size=3,
  strides=2,
  padding='SAME',
  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.