Main Content

plot

Plot neural network architecture

Syntax

Description

plot(net) plots the layers and connections of the neural network net.

Tip

To create an interactive network visualization and analyze the network architecture, use deepNetworkDesigner(net). For more information, see Deep Network Designer.

example

Examples

collapse all

Create a simple neural network and display it in a plot.

net = dlnetwork;

layers = [
    imageInputLayer([32 32 3])
    convolution2dLayer(3,16,Padding="same")
    batchNormalizationLayer
    reluLayer(Name="relu1")
    
    convolution2dLayer(3,16,Padding="same",Stride=2)
    batchNormalizationLayer
    reluLayer
    additionLayer(2,Name="add")];

net = addLayers(net,layers);
net = connectLayers(net,"relu1","add/in2");

figure
plot(net)

Figure contains an axes object. The axes object contains an object of type graphplot.

Input Arguments

collapse all

Neural network, specified as a dlnetwork object.

Version History

Introduced in R2017b

expand all