public struct MaxPool1D<Scalar> : Layer where Scalar : TensorFlowFloatingPoint

A max pooling layer for temporal data.

  • Creates a max pooling layer.

    Declaration

    public init(
        poolSize: Int,
        stride: Int,
        padding: Padding
    )

    Parameters

    poolSize

    The size of the sliding reduction window for pooling.

    stride

    The stride of the sliding window for temporal dimension.

    padding

    The padding algorithm for pooling.

  • Returns the output obtained from applying the layer to the given input.

    Declaration

    public func call(_ input: Tensor<Scalar>) -> Tensor<Scalar>

    Parameters

    input

    The input to the layer.

    Return Value

    The output.