Main Content

plot

Plot neural network architecture

Syntax

Description

example

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.

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)

Input Arguments

collapse all

Neural network, specified as a dlnetwork object.

Version History

Introduced in R2017b

expand all