NetInsert
Details
- If a chain was created using the association form <|"name1"->layer1,"name2"->layer2,…|>, then NetInsert [chain,"name"->layer,pos] should be used.
- If a chain was created using the list form {layer1,layer2,…}, then NetInsert [chain,layer,i] should be used.
- The inserted layer must be compatible with the output of the previous layer and the input of the next layer.
Examples
open all close allBasic Examples (2)
Insert a layer at the end of a chain:
Insert a named layer in the middle of a chain:
Possible Issues (1)
When inserting a layer into a chain containing named layers, the key must not already exist:
Tech Notes
Related Guides
History
Text
Wolfram Research (2018), NetInsert, Wolfram Language function, https://reference.wolfram.com/language/ref/NetInsert.html.
CMS
Wolfram Language. 2018. "NetInsert." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/NetInsert.html.
APA
Wolfram Language. (2018). NetInsert. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetInsert.html
BibTeX
@misc{reference.wolfram_2025_netinsert, author="Wolfram Research", title="{NetInsert}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/NetInsert.html}", note=[Accessed: 06-January-2026]}
BibLaTeX
@online{reference.wolfram_2025_netinsert, organization={Wolfram Research}, title={NetInsert}, year={2018}, url={https://reference.wolfram.com/language/ref/NetInsert.html}, note=[Accessed: 06-January-2026]}