disconnectLayers
層グラフの層の切り離し
説明
例
層グラフの層の切り離し
層の配列から層グラフを作成します。
layers = [ imageInputLayer([28 28 1],'Name','input') convolution2dLayer(3,16,'Padding','same','Name','conv_1') batchNormalizationLayer('Name','BN_1') reluLayer('Name','relu_1')]; lgraph = layerGraph(layers); figure plot(lgraph)
'conv_1'
層を 'BN_1'
層から切り離します。
lgraph = disconnectLayers(lgraph,'conv_1','BN_1'); figure plot(lgraph)
入力引数
lgraph
— 層グラフ
LayerGraph
オブジェクト
層グラフ。LayerGraph
オブジェクトとして指定します。層グラフを作成するには、layerGraph
を使用します。
s
— 結合元
文字ベクトル | string スカラー
結合元。文字ベクトルまたは string スカラーとして指定します。
結合元の層に 1 つの出力がある場合、
s
は層の名前です。結合元の層に複数の出力がある場合、
s
は層の名前で、その後に文字 /、さらに層出力の名前が続きます ('layerName/outputName'
)。
例: 'conv1'
例: 'mpool/indices'
d
— 結合先
文字ベクトル | string スカラー
結合先。文字ベクトルまたは string スカラーとして指定します。
結合先の層に 1 つの入力がある場合、
d
は層の名前です。結合先の層に複数の入力がある場合、
d
は層の名前で、その後に文字 /、さらに層入力の名前が続きます ('layerName/inputName'
)。
例: 'fc'
例: 'addlayer1/in2'
出力引数
newlgraph
— 出力層グラフ
LayerGraph
オブジェクト
出力層グラフ。LayerGraph
オブジェクトとして返されます。
バージョン履歴
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)