connects a series of NetChain objects to form a single NetChain.


  • The output of chaini should be compatible with the input of chaini+1.
  • Any NetEncoder or NetDecoder objects will be removed unless they occur on the first or last layer of the resulting chain and no corresponding "port"->spec is given.
  • If any of the chaini were constructed from named layers, then all the chains must be so constructed.
  • NetJoin[chain1,chain2,,"port"->spec,] can be used to specify types for the input and/or output of the resulting NetChain, using the normal type specifications allowed by NetChain. The new port specifications will replace any existing NetEncoder, NetDecoder or type.


open allclose all

Basic Examples  (2)

Join two chains:

Join two chains constructed of named layers:

Scope  (1)

Join two chains and provide input and output types:

Possible Issues  (2)

The output of the final layer in each chain should be compatible with the input of the first layer in the next chain:

All named layers must have unique names:

Introduced in 2018