plot
绘制神经网络架构
说明
示例
绘图层图
基于层数组创建一个层图。将 'relu_1'
层连接到 'add'
层。
layers = [ imageInputLayer([32 32 3],'Name','input') convolution2dLayer(3,16,'Padding','same','Name','conv_1') batchNormalizationLayer('Name','BN_1') reluLayer('Name','relu_1') convolution2dLayer(3,16,'Padding','same','Stride',2,'Name','conv_2') batchNormalizationLayer('Name','BN_2') reluLayer('Name','relu_2') additionLayer(2,'Name','add')]; lgraph = layerGraph(layers); lgraph = connectLayers(lgraph,'relu_1','add/in2');
绘制层图。
figure plot(lgraph);
绘制 DAG 网络
将一个预训练的 GoogLeNet 卷积神经网络作为 DAGNetwork
对象加载。如果未安装 Deep Learning Toolbox™ Model for GoogLeNet Network 支持包,则软件会提供下载链接。
net = googlenet
net = DAGNetwork with properties: Layers: [144×1 nnet.cnn.layer.Layer] Connections: [170×2 table]
绘制该网络。
figure('Units','normalized','Position',[0.1 0.1 0.8 0.8]); plot(net)
串行网络绘图
将一个预训练的 AlexNet 卷积神经网络作为 SeriesNetwork
对象加载。如果未安装 Deep Learning Toolbox™ Model for AlexNet Network 支持包,则软件会提供下载链接。
net = alexnet
net = SeriesNetwork with properties: Layers: [25x1 nnet.cnn.layer.Layer] InputNames: {'data'} OutputNames: {'output'}
绘制该网络。
plot(net)
输入参数
lgraph
— 层图
LayerGraph
对象
层图,指定为 LayerGraph
对象。要创建层图,请使用 layerGraph
。
net
— 深度学习网络
SeriesNetwork
对象 | DAGNetwork
对象 | dlnetwork
对象
深度学习网络,指定为 SeriesNetwork
、DAGNetwork
或 dlnetwork
对象。
版本历史记录
在 R2017b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)