diffusion_models.utils.adopt ============================ .. py:module:: diffusion_models.utils.adopt Module Contents --------------- .. py:class:: ADOPT(params, lr = 0.001, betas = (0.9, 0.9999), eps = 1e-06, weight_decay = 0.0, decoupled = False, *, foreach = None, maximize = False, capturable = False, differentiable = False, fused = None) Base class for all optimizers. .. warning:: Parameters need to be specified as collections that have a deterministic ordering that is consistent between runs. Examples of objects that don't satisfy those properties are sets and iterators over values of dictionaries. :param params: an iterable of :class:`torch.Tensor` s or :class:`dict` s. Specifies what Tensors should be optimized. :type params: iterable :param defaults: (dict): a dict containing default values of optimization options (used when a parameter group doesn't specify them). .. py:method:: step(closure=None) Perform a single optimization step. :param closure: A closure that reevaluates the model and returns the loss. :type closure: Callable, optional .. py:function:: adopt(params, grads, exp_avgs, exp_avg_sqs, state_steps, foreach = None, capturable = False, differentiable = False, fused = None, grad_scale = None, found_inf = None, has_complex = False, *, beta1, beta2, lr, weight_decay, decoupled, eps, maximize) Functional API that performs ADOPT algorithm computation.