NetAppend

NetAppend[net,layer]

appends a layer or a net onto a NetChain, a layer or a NetGraph with one output port.

NetAppend[net,"name"layer]

appends a layer with a given name.

NetAppend[net,{layer1,layer2,}]

appends several layers or nets.

Details and Options

  • The input of the appended layer must be compatible with the output of the final layer in the chain.
  • Any NetDecoder attached to the end of the chain will be removed.
  • NetAppend[chain,layerspec,"Output"spec] can be used to specify a type for the output of the resulting chain, using the normal type specifications allowed by NetChain. The new port specification will replace any existing NetDecoder or type.

Examples

open allclose all

Basic Examples  (3)

Append a layer to the end of a chain:

Append a named layer to the end of a chain:

Append several layers to the end of a chain:

Scope  (3)

Append a layer and attach a NetDecoder:

Create a NetChain with NetAppend:

Append a layer to a NetGraph with one output:

Append a named layer:

Possible Issues  (3)

The input of the appended layer must be compatible with the output of the final layer in the chain:

A layer with several input ports cannot be appended:

A layer cannot be appended to a network with more than one output:

Wolfram Research (2018), NetAppend, Wolfram Language function, https://reference.wolfram.com/language/ref/NetAppend.html (updated 2021).

Text

Wolfram Research (2018), NetAppend, Wolfram Language function, https://reference.wolfram.com/language/ref/NetAppend.html (updated 2021).

CMS

Wolfram Language. 2018. "NetAppend." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/NetAppend.html.

APA

Wolfram Language. (2018). NetAppend. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetAppend.html

BibTeX

@misc{reference.wolfram_2023_netappend, author="Wolfram Research", title="{NetAppend}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/NetAppend.html}", note=[Accessed: 29-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_netappend, organization={Wolfram Research}, title={NetAppend}, year={2021}, url={https://reference.wolfram.com/language/ref/NetAppend.html}, note=[Accessed: 29-March-2024 ]}