public struct Dropout<Scalar> : Layer where Scalar : TensorFlowFloatingPoint

A dropout layer.

Dropout consists in randomly setting a fraction of input units to 0 at each update during training time, which helps prevent overfitting.

  • Declaration

    public let probability: Double
  • Creates a dropout layer.

    Declaration

    public init(probability: Double)

    Parameters

    probability

    The drop probability.

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

    Declaration

    public func call(_ input: Tensor<Scalar>) -> Tensor<Scalar>

    Parameters

    input

    The input to the layer.

    Return Value

    The output.