Save the date! Google I/O returns May 18-20 Register now

Optimizer

public protocol Optimizer : CopyableToDevice

A numerical optimizer.

Optimizers apply an optimization algorithm to update a differentiable model.

  • The type of the model to optimize.

    Declaration

    associatedtype Model : Differentiable
  • The scalar parameter type.

    Declaration

    associatedtype Scalar : FloatingPoint
  • The learning rate.

    Declaration

    var learningRate: Scalar { get set }
  • Updates the given model along the given direction.

    Declaration

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