GaussianNoise

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

GaussianNoise adds noise sampled from a normal distribution.

The noise added always has mean zero, but has a configurable standard deviation.

  • Declaration

    @noDerivative
    public let standardDeviation: Tensor<Scalar>
  • Creates a Gaussian noise layer

    Declaration

    public init(standardDeviation: Scalar)

    Parameters

    standardDeviation

    Standard deviation of the Guassian distribution

  • Returns a tensor obtained by adding noise to input

    Declaration

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