You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an easier syntax for the last two layers would be Parallel(fusion, chain1, chain2) which entails allowing connection in Parallel to be a Lux layer. Likely adding an if C <: AbstractExplicitLayer statement here.
Similarly, BranchLayer can be extended with kwarg fusion like BranchLayer(layers...; fusion = nothing) with behaviour x -> fusion(f(x), g(x)). This is equivalent to
Chain(
BranchLayer(chain1, chain2), # x -> (f(x), g(x))
fusion, # (x1, x2) -> z
)
The default can be set to the current behaviour (x -> (f(x), g(x))) with fusion = nothing.
The text was updated successfully, but these errors were encountered:
This seems to be a common use of
Parallel
/BranchLayer
containers:an easier syntax for the last two layers would be
Parallel(fusion, chain1, chain2)
which entails allowingconnection
inParallel
to be a Lux layer. Likely adding anif C <: AbstractExplicitLayer
statement here.Lux.jl/src/layers/containers.jl
Lines 162 to 166 in 2dde6f8
Similarly,
BranchLayer
can be extended with kwargfusion
likeBranchLayer(layers...; fusion = nothing)
with behaviourx -> fusion(f(x), g(x))
. This is equivalent toThe default can be set to the current behaviour (
x -> (f(x), g(x))
) withfusion = nothing
.The text was updated successfully, but these errors were encountered: