• Computes the 2D average pooling of an image.

    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 | "valid" | "same" | ExplicitPadding

      The type of padding algorithm:

    • Optional dimRoundingMode: "floor" | "round" | "ceil"

      A string from: 'ceil', 'round', 'floor'. If none is provided, it will default to truncate.

    Returns T

    Doc