Skip to content
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 1 reply

Comment options

You must be logged in to vote
1 reply
@louiskenyon98
Comment options

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
3 participants