layerGraph
Graph of network layers for deep learning
Description
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 input to the
trainNetwork
function or convert it to a
dlnetwork
and train it using a
custom training loop.
Creation
Description
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
.
Input Arguments
Properties
Object Functions
addLayers | Add layers to layer graph or network |
removeLayers | Remove layers from layer graph or network |
replaceLayer | Replace layer in layer graph or network |
connectLayers | Connect layers in layer graph or network |
disconnectLayers | Disconnect layers in layer graph or network |
plot | Plot neural network architecture |
Examples
Limitations
Layer graph objects contain no quantization information. Extracting the layer graph from a quantized network and then reassembling the network using
assembleNetwork
ordlnetwork
removes quantization information from the network.
Version History
Introduced in R2017b
See Also
trainNetwork
| DAGNetwork
| addLayers
| removeLayers
| connectLayers
| disconnectLayers
| plot
| googlenet
| resnet18
| resnet50
| resnet101
| inceptionresnetv2
| squeezenet
| additionLayer
| replaceLayer
| depthConcatenationLayer
| inceptionv3
| analyzeNetwork
| assembleNetwork
| Deep Network
Designer