ClikaRT::ops::max_pool2d
function
max_pool2d()
Tensor max_pool2d(
Tensor x,
ClikaRT::Span<const std::int64_t> kernel_size,
ClikaRT::Span<const std::int64_t> stride = {},
ClikaRT::Span<const std::int64_t> padding = {0, 0},
ClikaRT::Span<const std::int64_t> dilation = {1, 1},
bool ceil_mode = false
)
2-D max pooling over [N, H, W, C] (channels-last).
Each output element is the max over its kernel_size window; stride empty defaults to kernel_size (non-overlapping windows); dilation spaces the window's taps; ceil_mode rounds the output extents up.
Parameters
x: the input,[N, H, W, C].kernel_size:{kH, kW}.stride:{sH, sW}; empty =kernel_size.padding:{pH, pW}; default{0, 0}.dilation:{dH, dW}; default{1, 1}.ceil_mode: round output extents up; default false.
Returns: [N, H', W', C], dtype of x.
Throws
ClikaRT::Error: (INVALID_ARGUMENT) on mismatched parameter ranks.
auto y = ClikaRT::ops::max_pool2d(x, {3, 3}, {2, 2}, {1, 1});
Declared in ClikaRT/compute/ops.h, line 3972