GaussianDropout

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

GaussianDropout multiplies the input with the noise sampled from a normal distribution with mean 1.0.

Because this is a regularization layer, it is only active during training time. During inference, GaussianDropout passes through the input unmodified.

  • Declaration

    @noDerivative
    public let probability: Scalar
  • Declaration

    @noDerivative
    public let standardDeviation: Scalar
  • Creates a Gaussian dropout layer.

    Precondition

    probability must be a value between 0 and 1 (inclusive).

    Declaration

    public init(probability: Scalar)

    Parameters

    probability

    The probability of a node dropping out.

  • Applies multiplicative 1-centered Gaussian noise to the input during training only.

    Declaration

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