Graph of network layers for deep learning
A layer graph specifies the architecture of a deep learning network with a
more complex graph structure in which layers can have inputs from multiple layers and
outputs to multiple layers. Networks with this structure are called directed acyclic
graph (DAG) networks. After you create a layerGraph
object, you can use
the object functions to plot the graph and modify it by adding, removing, connecting,
and disconnecting layers. To train the network, use the layer graph as the layers
input argument to trainNetwork
.
creates an empty
layer graph that contains no layers. You can add layers to the empty graph by
using the lgraph
= layerGraphaddLayers
function.
creates a layer graph from an array of network layers and sets the lgraph
= layerGraph(layers
)Layers
property. The layers in
lgraph
are connected in the same sequential order as in
layers
. All layers must have unique, nonempty
names.
extracts the layer graph of a lgraph
= layerGraph(dagNet
)DAGNetwork
. For example, you can
extract the layer graph of a pretrained network to perform transfer
learning.
extracts the layer graph of a lgraph
= layerGraph(dlnet
)dlnetwork
. Use this syntax to use
a dlnetwork
with the trainNetwork
function or Deep
Network Designer.
addLayers | Add layers to layer graph |
removeLayers | Remove layers from layer graph |
replaceLayer | Replace layer in layer graph |
connectLayers | Connect layers in layer graph |
disconnectLayers | Disconnect layers in layer graph |
plot | Plot neural network layer graph |
Layer graphs cannot specify the architecture of long short-term memory (LSTM) networks. For more information on how to create an LSTM network, see Long Short-Term Memory Networks.
additionLayer
| addLayers
| analyzeNetwork
| assembleNetwork
| connectLayers
| DAGNetwork
| Deep Network
Designer | depthConcatenationLayer
| disconnectLayers
| googlenet
| inceptionresnetv2
| inceptionv3
| plot
| removeLayers
| replaceLayer
| resnet101
| resnet18
| resnet50
| squeezenet
| trainNetwork