MaxPool1D

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

A max pooling layer for temporal data.

  • Declaration

    public typealias TangentVector = EmptyTangentVector
  • The size of the sliding reduction window for pooling.

    Declaration

    @noDerivative
    public let poolSize: Int
  • The stride of the sliding window for temporal dimension.

    Declaration

    @noDerivative
    public let stride: Int
  • The padding algorithm for pooling.

    Declaration

    @noDerivative
    public let padding: Padding
  • 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

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

    Parameters

    input

    The input to the layer.

    Return Value

    The output.