Skip to content

Commit

Permalink
Fix error message in optimizers piecewise_constant. (jax-ml#3061)
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkinsp authored May 12, 2020
1 parent ccb8d45 commit 8008aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jax/experimental/optimizers.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ def piecewise_constant(boundaries, values):
if not boundaries.ndim == values.ndim == 1:
raise ValueError("boundaries and values must be sequences")
if not boundaries.shape[0] == values.shape[0] - 1:
raise ValueError("boundaries length must be one longer than values length")
raise ValueError("boundaries length must be one shorter than values length")

def schedule(i):
return values[jnp.sum(i > boundaries)]
Expand Down

0 comments on commit 8008aa9

Please sign in to comment.