torch.optim.functional.adafactor#
- torch.optim.functional.adafactor(params, grads, row_vars, col_vars, variances, state_steps, foreach=None, grad_scale=None, found_inf=None, has_complex=False, *, d, lr, beta2_decay, weight_decay, eps1, eps2, maximize)[source]#
Functional API that performs Adafactor algorithm computation.
This function updates the provided parameters and optimizer state in place. The caller must initialize and retain optimizer state. Unless intentionally constructing a differentiable update with a supported
differentiable=Trueargument, call this function undertorch.no_grad. See Functional optimizer API for the common functional optimizer contract and examples, andAdafactorfor algorithm details.