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
functor(::Type{<:Chain}, c) = c.layers, ls ->Chain(ls...)
Or we could delete it, and let Chain be more like Parallel:
julia> Flux.functor(Chain(x=sin, y=cos))
((x = sin, y = cos), Flux.var"#154#155"())
julia> Flux.functor(Parallel(vcat, (x=sin, y=cos)))
((connection = vcat, layers = (x = sin, y = cos)), Flux.var"#178#179"())
Then we would want delete the inner constructor for Chain, so that it accepts a tuple, Chain((sin, cos)) == Chain(sin, cos). That would line up with #1809 allowing Chain([sin, cos]) as a type-unstable variant.
The text was updated successfully, but these errors were encountered:
From FluxML/Optimisers.jl#49 (comment), this isn't great:
The culprit is this
functor
method, which could be extended to deal with this.Flux.jl/src/layers/basic.jl
Line 44 in fe803a1
Or we could delete it, and let Chain be more like Parallel:
Then we would want delete the inner constructor for Chain, so that it accepts a tuple,
Chain((sin, cos)) == Chain(sin, cos)
. That would line up with #1809 allowingChain([sin, cos])
as a type-unstable variant.The text was updated successfully, but these errors were encountered: