Skip to content

Commit

Permalink
Fix positional arguments to optimizer.stateless_apply (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhawajaAbaid authored Jan 16, 2024
1 parent 9bb7074 commit 529f6e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/writing_a_custom_training_loop_in_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def train_step(state, data):
trainable_variables, non_trainable_variables, x, y
)
trainable_variables, optimizer_variables = optimizer.stateless_apply(
grads, trainable_variables, optimizer_variables
optimizer_variables, grads, trainable_variables
)
# Return updated state
return loss, (
Expand Down

0 comments on commit 529f6e6

Please sign in to comment.