oneflow.nn.functional.max_pool1d(input, kernel_size, stride=None, padding=0, dilation=1, return_indices=False, ceil_mode=False, data_format='channels_first')

Applies a 1D max pooling over an input signal composed of several input planes.

The documentation is referenced from:


The order of ceil_mode and return_indices is different from what seen in MaxPool1d, and will change in a future release.

See MaxPool1d for details.

  • input – input tensor of shape \((\text{minibatch} , \text{in_channels} , iW)\), minibatch dim optional.

  • kernel_size – the size of the window. Can be a single number or a tuple (kW,)

  • stride – the stride of the window. Can be a single number or a tuple (sW,). Default: kernel_size

  • padding – Implicit negative infinity padding to be added on both sides, must be >= 0 and <= kernel_size / 2.

  • dilation – The stride between elements within a sliding window, must be > 0.

  • return_indices – If True, will return the argmax along with the max values.Useful for oneflow.nn.functional.max_unpool1d later.

  • ceil_mode – If True, will use ceil instead of floor to compute the output shape. This ensures that every element in the input tensor is covered by a sliding window.