Skip to content

Commit

Permalink
update doctest in lbfgs
Browse files Browse the repository at this point in the history
rdyro committed Jan 28, 2025
1 parent 6bd761c commit 73014f9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions optax/_src/alias.py
Original file line number Diff line number Diff line change
@@ -2475,7 +2475,7 @@ def lbfgs(
Objective function: 14.0
>>> opt_state = solver.init(params)
>>> value_and_grad = optax.value_and_grad_from_state(f)
>>> for _ in range(5):
>>> for _ in range(2):
... value, grad = value_and_grad(params, state=opt_state)
... updates, opt_state = solver.update(
... grad, opt_state, params, value=value, grad=grad, value_fn=f
@@ -2484,9 +2484,6 @@ def lbfgs(
... print('Objective function: {:.2E}'.format(f(params)))
Objective function: 7.52E+00
Objective function: 7.46E-14
Objective function: 2.65E-28
Objective function: 0.00E+00
Objective function: 0.00E+00
References:
Algorithms 7.4, 7.5 (page 199) of Nocedal et al, `Numerical Optimization

0 comments on commit 73014f9

Please sign in to comment.