ZeroPadding1D

public struct ZeroPadding1D<Scalar> : ParameterlessLayer where Scalar : TensorFlowFloatingPoint

A layer for adding zero-padding in the temporal dimension.

  • Declaration

    public typealias TangentVector = EmptyTangentVector
  • The padding values along the temporal dimension.

    Declaration

    @noDerivative
    public let padding: (Int, Int)
  • Creates a zero-padding 1D Layer.

    Declaration

    public init(padding: (Int, Int))

    Parameters

    padding

    A tuple of two integers describing how many zeros to be padded at the beginning and end of the padding dimension.

  • Creates a zero-padding 1D Layer.

    Declaration

    public init(padding: Int)

    Parameters

    padding

    An integer which describes how many zeros to be padded at the beginning and end of the padding dimension.

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

    Declaration

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

    Parameters

    input

    The input to the layer.

    Return Value

    The output.