Skip to content

Commit

Permalink
Merge #1749
Browse files Browse the repository at this point in the history
1749: Fix @ Functors 404's r=DhairyaLGandhi a=logankilpatrick

Related to #1745

Co-authored-by: Logan Kilpatrick <[email protected]>
  • Loading branch information
bors[bot] and logankilpatrick authored Oct 17, 2021
2 parents ec8def6 + a1fd2c2 commit f8ebead
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/src/models/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Join(combine, paths...) = Join(combine, paths)
```
Notice that we parameterized the type of the `paths` field. This is necessary for fast Julia code; in general, `T` might be a `Tuple` or `Vector`, but we don't need to pay attention to what it specifically is. The same goes for the `combine` field.

The next step is to use [`Flux.@functor`](@ref) to make our struct behave like a Flux layer. This is important so that calling `params` on a `Join` returns the underlying weight arrays on each path.
The next step is to use [`Functors.@functor`](@ref) to make our struct behave like a Flux layer. This is important so that calling `params` on a `Join` returns the underlying weight arrays on each path.
```julia
Flux.@functor Join
```
Expand Down Expand Up @@ -151,7 +151,7 @@ model(xs)

Our custom `Split` layer will accept a single input, then pass the input through a separate path to produce multiple outputs.

We start by following the same steps as the `Join` layer: define a struct, use [`Flux.@functor`](@ref), and define the forward pass.
We start by following the same steps as the `Join` layer: define a struct, use [`Functors.@functor`](@ref), and define the forward pass.
```julia
using Flux
using CUDA
Expand Down

0 comments on commit f8ebead

Please sign in to comment.