dicee.models.adopt ================== .. py:module:: dicee.models.adopt Classes ------- .. autoapisummary:: dicee.models.adopt.ADOPT Functions --------- .. autoapisummary:: dicee.models.adopt.adopt Module Contents --------------- .. py:class:: ADOPT(params: torch.optim.optimizer.ParamsT, lr: Union[float, torch.Tensor] = 0.001, betas: Tuple[float, float] = (0.9, 0.9999), eps: float = 1e-06, clip_lambda: Optional[Callable[[int], float]] = lambda step: step**0.25, weight_decay: float = 0.0, decouple: bool = False, *, foreach: Optional[bool] = None, maximize: bool = False, capturable: bool = False, differentiable: bool = False, fused: Optional[bool] = None) Bases: :py:obj:`torch.optim.optimizer.Optimizer` 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:attribute:: clip_lambda .. py:method:: __setstate__(state) .. 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: List[torch.Tensor], grads: List[torch.Tensor], exp_avgs: List[torch.Tensor], exp_avg_sqs: List[torch.Tensor], state_steps: List[torch.Tensor], foreach: Optional[bool] = None, capturable: bool = False, differentiable: bool = False, fused: Optional[bool] = None, grad_scale: Optional[torch.Tensor] = None, found_inf: Optional[torch.Tensor] = None, has_complex: bool = False, *, beta1: float, beta2: float, lr: Union[float, torch.Tensor], clip_lambda: Optional[Callable[[int], float]], weight_decay: float, decouple: bool, eps: float, maximize: bool) Functional API that performs ADOPT algorithm computation.