-
Undocumented
Declaration
Swift
public typealias ParamTensor = Tensor<Layer.Parameter, Layer.Device> -
Declaration
Swift
public private(set) var model: Layer { get } -
Learning rate with which to move along the gradient
Declaration
Swift
public var learningRate: ParamTensor -
Decay rate of momentum that is built up, when subsequent gradient updates move in the same direction
Declaration
Swift
public var momentum: ParamTensor -
Gradient descent optimizer with momentum
Declaration
Swift
public init(model: Layer, learningRate: ParamTensor, momentum: ParamTensor = 0.8)Parameters
modelModel to optimize
learningRateLearning rate with which to move along the gradient
momentumDecay rate of momentum that is built up, when subsequent gradient updates move in the same direction
-
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
View on GitHub
Momentum Structure Reference