mlx.optimizers.Optimizer.update#
- Optimizer.update(model: Module, gradients: dict)#
Apply the gradients to the parameters of the model and update the model with the new parameters.
- Parameters:
model (Module) – An mlx module to be updated.
gradients (dict) – A Python tree of gradients, most likely computed via
mlx.nn.value_and_grad()
.