ClikaRT::ops::max_pool
function
max_pool()
Tensor max_pool(
Tensor x,
ClikaRT::Span<const std::int64_t> kernel_size,
ClikaRT::Span<const std::int64_t> stride,
ClikaRT::Span<const std::int64_t> padding,
ClikaRT::Span<const std::int64_t> dilation,
bool ceil_mode
)
Rank-generic max pooling, channels-last.
x is [N, D1..Dn, C]; the window rank is read from kernel_size's length. Each output element is the maximum over its window. Padding regions never win (they are -inf for the comparison).
Parameters
x: the input,[N, D1..Dn, C].kernel_size: window extent per spatial dim.stride: window step per spatial dim; empty =kernel_size.padding: implicit padding per spatial dim.dilation: element spacing inside the window.ceil_mode: round output extents up instead of down; default false.
Returns: the pooled tensor, [N, D1'..Dn', C], dtype of x.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) when the parameter ranks disagree or a window over-runs the padded input.
Declared in ClikaRT/compute/ops.h, line 3942