Skip to main content

ClikaRT::ops::adaptive_max_pool

function

adaptive_max_pool()

Tensor adaptive_max_pool(Tensor x, ClikaRT::Span<const std::int64_t> output_size)

Rank-generic adaptive MAX pooling to a target output size, channels-last, the max sibling of adaptive_avg_pool.

Parameters

  • x: the input, [N, D1..Dn, C].
  • output_size: target spatial extents, one per spatial dim.

Returns: [N, output_size.., C], dtype of x.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when output_size's rank does not match the input's spatial rank.

Declared in ClikaRT/compute/ops.h, line 3852