ZeroPadding3D

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

A layer for adding zero-padding in the spatial/spatio-temporal dimensions.

  • Declaration

    public typealias TangentVector = EmptyTangentVector
  • The padding values along the spatial/spatio-temporal dimensions.

    Declaration

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

    Declaration

    public init(padding: ((Int, Int), (Int, Int), (Int, Int)))

    Parameters

    padding

    A tuple of 3 tuples of two integers describing how many zeros to be padded at the beginning and end of each padding dimensions.

  • Creates a zero-padding 3D Layer.

    Declaration

    public init(padding: (Int, Int, Int))

    Parameters

    padding

    Tuple of 3 integers that describes how many zeros to be padded at the beginning and end of each padding dimensions.

  • 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.