Skip to content

How to get params of optimizer? #316

Discussion options

You must be logged in to vote

@arihantbansal

I think you are looking for the following two lines of code.

updates, opt_state = optimizer.update(grads, opt_state)
params = optax.apply_updates(params, updates)

At each iteration

  1. Update the optimizer state optimizer.update(grads, opt_state)
  2. Update the parameters of the neural network optax.apply_updates(params, updates)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by arihantbansal
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