Skip to content

Commit 3b7895e

Browse files
Merge #1608
1608: fix typo in models overview document r=CarloLucibello a=teamclouday I saw this when I was viewing the introductory [tutorial](https://fluxml.ai/Flux.jl/stable/models/overview/). So I want to help fix it. ### PR Checklist - [ ] Tests are added - [ ] Entry in NEWS.md - [x] Documentation, if applicable - [ ] API changes require approval from a committer (different from the author, if applicable) Co-authored-by: teamclouday <teamclouday@gmail.com>
2 parents 34199ca + 1667fc5 commit 3b7895e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/src/models/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Use the `actual` function to build sets of data for training and verification:
3232
julia> x_train, x_test = hcat(0:5...), hcat(6:10...)
3333
([0 1 … 4 5], [6 7 … 9 10])
3434
35-
julia> y_train, y_test = actual.(x_train), actual.(y_train)
35+
julia> y_train, y_test = actual.(x_train), actual.(x_test)
3636
([2 6 … 18 22], [26 30 … 38 42])
3737
```
3838

@@ -172,13 +172,13 @@ After 200 training steps, the loss went down, and the parameters are getting clo
172172
Now, let's verify the predictions:
173173

174174
```
175-
julia> predict(y_test)
175+
julia> predict(x_test)
176176
1×5 Array{Float64,2}:
177-
105.306 121.2 137.095 152.989 168.883
177+
25.8442 29.8194 33.7946 37.7698 41.745
178178
179-
julia> actual.(y_test)
179+
julia> y_test
180180
1×5 Array{Int64,2}:
181-
106 122 138 154 170
181+
26 30 34 38 42
182182
```
183183

184184
The predictions are good. Here's how we got there.

0 commit comments

Comments
 (0)