public apply(parameter as NDArray<T>, gradient as NDArray<T>, gradientScale as Double = 1.0) as Void
Updates a parameter in place, without modifying its gradient.
| Parameter | Description |
|---|---|
parameter | Mutable parameter tensor of any rank. |
gradientScale | Positive finite loss scale removed before the update. |
gradient | Same-shaped derivative, already reduced by the loss. |
optimizer.apply(layer.parameter(0l), gradients.parameters[0l])