The sample gradient should not use the softdash

While softdash is a very natural and mathematical way of representation, it can be very easily confused with the apostrophe used for LinAlg adjoint. Not worth and unnecessary confusion in a first example of the code.
This commit is contained in:
Sambit Kumar Dash 2018-09-11 18:58:07 +05:30 committed by GitHub
parent b93d4763cc
commit 8b9a98ed01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -10,14 +10,14 @@ using Flux.Tracker
f(x) = 3x^2 + 2x + 1
# df/dx = 6x + 2
f(x) = Tracker.gradient(f, x)[1]
df(x) = Tracker.gradient(f, x)[1]
f(2) # 14.0 (tracked)
df(2) # 14.0 (tracked)
# d²f/dx² = 6
f(x) = Tracker.gradient(f, x)[1]
d2f(x) = Tracker.gradient(df, x)[1]
f(2) # 6.0 (tracked)
d2f(2) # 6.0 (tracked)
```
(We'll learn more about why these numbers show up as `(tracked)` below.)