-
Undocumented
Declaration
Swift
public typealias ParamTensor = Tensor<Layer.Parameter, Layer.Device>
-
Declaration
Swift
public private(set) var model: Layer { get }
-
Initial learning rate scaling factor. Only used in first optimization step after initialization or reset.
Declaration
Swift
public var learningRate: ParamTensor
-
Exponential decay rate for squared gradient history
Declaration
Swift
public var gamma: ParamTensor
-
Normalization scalar added to divisors
Declaration
Swift
public var epsilon: ParamTensor
-
Adadelta Optimizer
Follows Matthew D. Zeiler - Adadelta: An adaptive learning rate method
Declaration
Swift
public init(model: Layer, learningRate: ParamTensor = 0.001, gamma: ParamTensor = 0.9, epsilon: ParamTensor = 1e-8)
Parameters
model
Model to optimize
learningRate
Initial learning rate, ignored after first step
gamma
Exponential decay rate for squared gradient history
epsilon
Normalization scalar added to divisors
-
Resets the state of the optimizer
Declaration
Swift
public mutating func reset()
-
Declaration
Swift
public mutating func update(along gradients: [ParamTensor])
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws