From ffd2db8d253cb72eb9f4c4ac05f492f0493c878a Mon Sep 17 00:00:00 2001 From: Lilith Orion Hafner Date: Fri, 2 Jun 2023 14:30:15 -0500 Subject: [PATCH] Fix broken example in documentation --- docs/src/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/src/index.md b/docs/src/index.md index b3ea8d776..40e4b0a0b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -172,6 +172,8 @@ julia> (l::Linear)(x) = l.W * x .+ l.b julia> model = Linear(rand(2, 5), rand(2)) Linear([0.267663 … 0.334385], [0.0386873, 0.0203294]) +julia> x = rand(5); + julia> dmodel = gradient(model -> sum(model(x)), model)[1] (W = [0.652543 … 0.683588], b = [1.0, 1.0]) ```