NetFlatten

NetFlatten[net]

collapses nested NetChain and NetGraph objects within net.

NetFlatten[net,n]

collapses up to nesting level n.

Details and Options

Examples

open all close all

Basic Examples  (2)

Flatten nested chains:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Flatten nested graphs:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (3)

Properties & Relations  (3)

Introduced in 2018
(11.3)
|
Updated in 2019
(12.0)