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:
parent
b93d4763cc
commit
8b9a98ed01
@ -10,14 +10,14 @@ using Flux.Tracker
|
|||||||
f(x) = 3x^2 + 2x + 1
|
f(x) = 3x^2 + 2x + 1
|
||||||
|
|
||||||
# df/dx = 6x + 2
|
# 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
|
# 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.)
|
(We'll learn more about why these numbers show up as `(tracked)` below.)
|
||||||
|
Loading…
Reference in New Issue
Block a user