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

An average pooling layer for temporal data.

  • Creates an average 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.