オプティマイザ

public protocol Optimizer : CopyableToDevice

数値オプティマイザー。

オプティマイザーは、最適化アルゴリズムを適用して微分可能モデルを更新します。

  • 最適化するモデルのタイプ。

    宣言

    associatedtype Model : Differentiable
  • スカラーパラメータのタイプ。

    宣言

    associatedtype Scalar : FloatingPoint
  • 学習率。

    宣言

    var learningRate: Scalar { get set }
  • 指定された方向に沿って指定されたモデルを更新します。

    宣言

    mutating func update(_ model: inout Model, along direction: Model.TangentVector)