plot
ニューラル ネットワーク アーキテクチャのプロット
説明
plot(
は、層グラフ lgraph
)lgraph
のダイアグラムをプロットします。関数 plot
は、各層に名前でラベルを付け、すべての層の接続を表示します。
ヒント
対話形式でネットワークを可視化してネットワーク アーキテクチャを解析するには、deepNetworkDesigner(lgraph)
を使用します。詳細については、ディープ ネットワーク デザイナーを参照してください。
例
層グラフのプロット
層の配列から層グラフを作成します。'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)