• Computes the 2D max pooling of an image with Argmax index. The indices in argmax are flattened, so that a maximum value at position [b, y, x, c] becomes flattened index: (y * width + x) * channels + c if include_batch_in_index is False; ((b * height + y) * width + x) * channels +c if include_batch_in_index is True.

    The indices returned are always in [0, height) x [0, width) before flattening.

    Type Parameters

    Parameters

    • x: TensorLike | T

      The input tensor, of rank 4 or rank 3 of shape [batch, height, width, inChannels]. If rank 3, batch of 1 is assumed.

    • filterSize: number | [number, number]

      The filter size: [filterHeight, filterWidth]. If filterSize is a single number, then filterHeight == filterWidth.

    • strides: number | [number, number]

      The strides of the pooling: [strideHeight, strideWidth]. If strides is a single number, then strideHeight == strideWidth.

    • pad: number | "same" | "valid"

      The type of padding algorithm.

    • Optional includeBatchInIndex: boolean

    Returns NamedTensorMap

    Doc

Generated using TypeDoc