Skip to content

Commit

Permalink
corrected gamma in the case not updated
Browse files Browse the repository at this point in the history
  • Loading branch information
zaccharieramzi committed Oct 7, 2022
1 parent 2ab6b2d commit 90dbb5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jaxopt/_src/lbfgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class LbfgsState(NamedTuple):
s_history: Any
y_history: Any
rho_history: jnp.ndarray
gamma: float = 1.0
gamma: Any = jnp.array(1.0)
aux: Optional[Any] = None


Expand Down Expand Up @@ -349,7 +349,7 @@ def update(self,
if self.use_gamma:
gamma = compute_gamma(s_history, y_history, last)
else:
gamma = 1.0
gamma = jnp.array(1.0)

new_state = LbfgsState(iter_num=state.iter_num + 1,
value=new_value,
Expand Down

0 comments on commit 90dbb5b

Please sign in to comment.