NetFlatten
NetFlatten[net]
NetFlatten[net,n]
collapses up to nesting level n.
Details and Options
- NetFlatten[net] will flatten nested nets at any level, including within operators such as NetMapOperator and NetFoldOperator.
Examples
open allclose allScope (3)
Properties & Relations (3)
NetFlatten flattens nested nets, including within operators.
Construct an operator that contains nested chains:
The inner net of the NetMapOperator has been flattened:
NetFlatten yields a NetChain for a NetGraph that is fully flat:
NetFlatten yields a NetGraph for a NetChain that contains a nested NetGraph:
Text
Wolfram Research (2018), NetFlatten, Wolfram Language function, https://reference.wolfram.com/language/ref/NetFlatten.html (updated 2019).
CMS
Wolfram Language. 2018. "NetFlatten." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/NetFlatten.html.
APA
Wolfram Language. (2018). NetFlatten. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NetFlatten.html