MaxPool2d

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

2d max pooling layer.

Examples:

x = tl.layers.Input([None, 32, 50, 50])
y = tl.layers.MaxPool2d(filter_size=3, strides=2)(x)

__init__

MaxPool2d.__init__(
  filter_size=3,
  strides=2,
  padding='SAME',
  data_format='channels_first',
  name=None
)[source]

Create a MaxPool2d layer.

Parameters:
  • filter_size (Union[int, Sequence[int]], default=3, optional, default=3) – The size of pooling window.
  • strides (Union[int, Sequence[int]], default=2, optional, default=2) – The stride of pooling window.
  • padding (Union[{'VALID', 'SAME'}, Sequence[int]]) – The padding algorithm or padding sizes.
  • data_format ({'channels_first', 'channels_last'}, optional) – 'channels_first' or 'channels_last'.
  • name (str, optional) – The layer name.