Optimizer public protocol Optimizer Optimizer that updates a neural network along its gradients Layer Type of the layer that is optimized Declaration Swift associatedtype Layer : LayerType model Model to optimize Note, that models are value types, so only optimizer.model is changed. Declaration Swift var model: Layer { get } update(along:) Updates the model along its gradient. The provided gradients must match the count and order of parameters in the network. Declaration Swift mutating func update(along gradients: [Tensor<Layer.Parameter, Layer.Device>]) Parameters gradients Gradient tangent vector of the model.