@frozen
public struct MaxPool2D<Scalar> : ParameterlessLayer where Scalar : TensorFlowFloatingPoint

A max pooling layer for spatial data.

  • Creates a max pooling layer.

    Declaration

    public init(poolSize: (Int, Int, Int, Int), strides: (Int, Int, Int, Int), padding: Padding)
  • Returns the output obtained from applying the layer to the given input.

    Declaration

    @differentiable
    public func callAsFunction(_ input: Tensor<Scalar>) -> Tensor<Scalar>

    Parameters

    input

    The input to the layer.

    Return Value

    The output.

  • Creates a max pooling layer.

    Declaration

    init(poolSize: (Int, Int), strides: (Int, Int), padding: Padding = .valid)

    Parameters

    poolSize

    Vertical and horizontal factors by which to downscale.

    strides

    The strides.

    padding

    The padding.