Skip to content

Commit

Permalink
renmae apply_gradients
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed May 13, 2024
1 parent 35c7648 commit f692da2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/contrib/training_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ end
for epoch in 1:100, (x, y) in dataset_
grads, loss, _, tstate = Lux.Experimental.compute_gradients(
ad, mse, (x, y), tstate)
tstate = Lux.Experimental.apply_gradients(tstate, grads, true)
tstate = Lux.Experimental.apply_gradients!(tstate, grads)
end

final_loss = first(mse(model, tstate.parameters, tstate.states, dataset_[1]))
Expand Down

0 comments on commit f692da2

Please sign in to comment.