lmflow.optim.dummy#

Dummy Optimizer.

Classes#

Dummy

An dummy optimizer that does nothing.

Module Contents#

class lmflow.optim.dummy.Dummy(params: Iterable[torch.nn.parameter.Parameter], lr: float = 0.0, betas: Tuple[float, float] = (0.9, 0.999), weight_decay: float = 0.0)[source]#

Bases: torch.optim.Optimizer

An dummy optimizer that does nothing.

Parameters:
params (Iterable[nn.parameter.Parameter]):

Iterable of parameters to optimize or dictionaries defining parameter groups.

lr (float, optional, defaults to 0):

The learning rate to use.

step(closure: Callable = None)[source]#

Performs a single optimization step.

Arguments:

closure (Callable, optional): A closure that reevaluates the model and returns the loss.