mlx.optimizers.Optimizer.apply_gradients#
- Optimizer.apply_gradients(gradients: dict, parameters: dict)#
Apply the gradients to the parameters and return the updated parameters.
Can be used to update a model via
model.update(opt.apply_gradients(grads, model))
which is precisely howOptimizer.update()
is implemented.