Skip to content

Commit 2f49370

Browse files
authored
Merge pull request #1434 from LilithHafner/patch-1
Fix broken example in documentation
2 parents 328bc01 + ffd2db8 commit 2f49370

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/src/index.md

+2
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ julia> (l::Linear)(x) = l.W * x .+ l.b
172172
julia> model = Linear(rand(2, 5), rand(2))
173173
Linear([0.267663 0.334385], [0.0386873, 0.0203294])
174174

175+
julia> x = rand(5);
176+
175177
julia> dmodel = gradient(model -> sum(model(x)), model)[1]
176178
(W = [0.652543 0.683588], b = [1.0, 1.0])
177179
```

0 commit comments

Comments
 (0)