Skip to content

L-BFGS Optimizer Config

popinn.LBFGSConfig ¤

Configuration for an L-BFGS optimization phase.

Source code in src/popinn/train.py
@dataclasses.dataclass(frozen=True)
class LBFGSConfig:
    """Configuration for an L-BFGS optimization phase."""

    num_epochs: int = 1000
    log_every: int = 500
    tol: float = 1e-6
    history_size: int = 10
    optimizer_kwargs: Mapping = dataclasses.field(default_factory=dict)
__init__(num_epochs=1000, log_every=500, tol=1e-06, history_size=10, optimizer_kwargs=dict()) ¤

Optimizer is jaxopt.LBFGS. Will be updated to the optax version in the future.

Parameters:

Name Type Description Default
num_epochs int

Maximum number of L-BFGS iterations.

1000
log_every int

Print a log line every this many iterations.

500
tol float

Convergence tolerance; iteration stops when the solver's error drops below this.

1e-06
history_size int

Number of past updates L-BFGS keeps to approximate the inverse Hessian.

10
optimizer_kwargs collections.abc.Mapping

Mapping for extra kwargs passed to the optimizer

dict()