Skip to content

Commit

Permalink
Merge pull request #1434 from LilithHafner/patch-1
Browse files Browse the repository at this point in the history
Fix broken example in documentation
  • Loading branch information
ToucheSir authored Jun 2, 2023
2 parents 328bc01 + ffd2db8 commit 2f49370
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])
```
Expand Down

0 comments on commit 2f49370

Please sign in to comment.