Update docs/src/training/optimisers.md

Co-Authored-By: Mike J Innes <mike.j.innes@gmail.com>
This commit is contained in:
Dhairya Gandhi 2019-09-11 19:21:15 +05:30 committed by GitHub
parent b6926f07a5
commit e0276139e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ x, y = rand(5), rand(2) # Dummy data
l = loss(x, y) # ~ 3
θ = Params([W, b])
grads = Zygote.gradient(() -> loss(x, y), θ)
grads = gradient(() -> loss(x, y), θ)
```
We want to update each parameter, using the gradient, in order to improve (reduce) the loss. Here's one way to do that: