Skip to content
fn

max_pool1d_op

→TensorImplPtr
int max_pool1d_op(const int & x, int KL, int stride_l, int pad_l, bool ceil_mode)

Python wrappers

Public Python APIs implemented by this engine symbol.

One-dimensional max pooling over a batch of sequences.

Emits the maximum of each sliding window of length KL along the last axis of the input.

Parameters

xTensorImplPtr
Input of shape (B, C, L).
KLint
Window length.
stride_lint= None
Stride. 0 is a sentinel meaning "use KL" (non-overlapping windows). Default: 0.
pad_lint= None
Zero-padding added to both ends. Default: 0.

Returns

TensorImplPtr

Output of shape (B, C, L_out) where Lout=⌊(L+2p−KL)/s+1⌋L_\text{out} = \lfloor (L + 2 p - KL)/s + 1 \rfloor.