Skip to main content

classy.optim.optimizers.radam

Classes

RAdam

class RAdam(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.

Args
params : iterable
an iterable of :class:torch.Tensor s or :class:dict s. Specifies what Tensors should be optimized.
defaults
(dict): a dict containing default values of optimization options (used when a parameter group doesn't specify them).

__init__

def __init__(
    params,
    lr=0.001,
    betas=(0.9, 0.999),
    eps=1e-08,
    weight_decay=0,
    degenerated_to_sgd=True,
)

step

def step(
    self,
    closure=None,
)

Performs a single optimization step (parameter update).

Args
closure : callable
A closure that reevaluates the model and returns the loss. Optional for most optimizers.

Note

Unless otherwise specified, this function should not modify the.grad field of the parameters.