Dropout

public struct Dropout<Element, Device> : LayerType, Codable where Element : RandomizableType, Device : DeviceType

A dropout layer

  • Declaration

    Swift

    public var parameterPaths: [WritableKeyPath<`Self`, Tensor<Element, Device>>] { get }
  • Declaration

    Swift

    public var parameters: [Tensor<Element, Device>] { get }
  • Rate, with which dropout is applied.

    Declaration

    Swift

    public var rate: Float
  • Whether dropout is active. If dropout is deactivated, this layer performs the identity mapping.

    Declaration

    Swift

    public var isActive: Bool
  • Creates a layer, that drops elements with the given probability.

    Declaration

    Swift

    public init(rate: Float)

    Parameters

    rate

    Dropout probability.

  • Declaration

    Swift

    public func callAsFunction(_ inputs: Tensor<Element, Device>) -> Tensor<Element, Device>