OptimizerLike

Contents

OptimizerLike#

class liesel.optim.OptimizerLike(*args, **kwargs)[source]#

Bases: Protocol

Structural interface consumed by OptimEngine.

Methods

init(position)

Initialize optimizer state from a full position.

not_position(position)

Extract the entries not owned by this optimizer.

position(position)

Extract the entries owned by this optimizer.

step(position, loss, carry)

Run one optimizer step and return its pre-update scalar loss.

Attributes

activate_after_epochs

Number of completed epochs before this optimizer becomes active.

identifier

Identifier used to store this optimizer's state.

position_keys

Names of the parameter entries owned by this optimizer.