Chain multiple Chains in Flux

You can splat the tuples/Chains:

Chain(
    conv_block(3, 128)...,
    conv_block(128, 256)...,
)

You can also define

 chain(A::Tuple...) = Chain(mapreduce(collect, vcat, A)...)

to do

chain(conv_block(3, 128), conv_block(128, 3))

directly.

1 Like