MaxPool2d

Contents

MaxPool2d#

class brainpy.dnn.MaxPool2d(kernel_size, stride=None, padding='VALID', channel_axis=-1, mode=None, name=None)[source]#
Applies a 1D max pooling over an input signal composed of several input

planes.

Parameters:
  • kernel_size (Union[int, Sequence[int]]) – An integer, or a sequence of integers defining the window to reduce over.

  • stride (Union[int, Sequence[int]]) – An integer, or a sequence of integers, representing the inter-window stride (default: (1, …, 1)).

  • padding (Union[str, int, Tuple[int, ...], Sequence[Tuple[int, int]]]) – Either the string ‘SAME’, the string ‘VALID’, or a sequence of n (low, high) integer pairs that give the padding to apply before and after each spatial dimension.

  • channel_axis (Optional[int]) – Axis of the spatial channels for which pooling is skipped. If None, there is no channel axis.

  • mode (Mode) – The computation mode.

  • name (Optional[str]) – The object name.