fix foldl in tutorial
This commit is contained in:
parent
53be49b102
commit
abcefb8ae3
|
@ -172,7 +172,7 @@ using Flux
|
|||
|
||||
layers = [Dense(10, 5, σ), Dense(5, 2), softmax]
|
||||
|
||||
model(x) = foldl((x, m) -> m(x), x, layers)
|
||||
model(x) = foldl((x, m) -> m(x), layers, init = x)
|
||||
|
||||
model(rand(10)) # => 2-element vector
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue