Skip to content

Commit 34199ca

Browse files
bors[bot]magicly
andauthored
Merge #1607
1607: document Join and Split error r=DhairyaLGandhi a=magicly ```julia (m::Join)(xs::Tuple) = m.combine(map((f, x) -> f(x), m.paths, xs)) ``` will get a `Vector` of `Tuple` of `Vector`. Should use `mapreduce` as `Flux.Parallel` or just use `(m::Join)(xs::Tuple) = m.combine(map((f, x) -> f(x), m.paths, xs)...)`. `CustomSplit` should be `Split`. Co-authored-by: magicly <magicly007@gmail.com>
2 parents b78a27b + 74261d2 commit 34199ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/models/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Flux.@functor Join
104104

105105
Finally, we define the forward pass. For `Join`, this means applying each `path` in `paths` to each input array, then using `combine` to merge the results.
106106
```julia
107-
(m::Join)(xs::Tuple) = m.combine(map((f, x) -> f(x), m.paths, xs))
107+
(m::Join)(xs::Tuple) = m.combine(map((f, x) -> f(x), m.paths, xs)...)
108108
(m::Join)(xs...) = m(xs)
109109
```
110110

@@ -172,7 +172,7 @@ Now we can test to see that our `Split` does indeed produce multiple outputs.
172172
```julia
173173
model = Chain(
174174
Dense(10, 5),
175-
CustomSplit(Dense(5, 1),Dense(5, 3),Dense(5, 2))
175+
Split(Dense(5, 1),Dense(5, 3),Dense(5, 2))
176176
) |> gpu
177177

178178
model(gpu(rand(10)))

0 commit comments

Comments
 (0)