From 8b9a98ed0129efb87a8a1f4d63e5c49b33c85869 Mon Sep 17 00:00:00 2001 From: Sambit Kumar Dash Date: Tue, 11 Sep 2018 18:58:07 +0530 Subject: [PATCH] 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. --- docs/src/models/basics.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/src/models/basics.md b/docs/src/models/basics.md index 88fa0a05..a0a39ab5 100644 --- a/docs/src/models/basics.md +++ b/docs/src/models/basics.md @@ -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.)