Skip to content

What does the learning_rate parameter mean? #390

Answered by rosshemsley
nalzok asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @nalzok!

Thanks for your question. Unfortunately, this is a place where the generated documentation does not do a good job of reflecting the code.

If you take a look at https://github.com/deepmind/optax/blob/master/optax/_src/alias.py#L226

You will see that the actual type is ScalarOrSchedule.
If a scalar is provided, then the same value is used for every step.
If a Schedule function is provided, then we will store the number of steps taken so far within the optimizer state, and call the Schedule function with the current number of steps to get the learning rate to use for each step.

I agree the documentation could be clearer here. We can raise an issue for this.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nalzok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants