Documentation

disconnectLayers

Disconnect layers in layer graph

Description

example

newlgraph = disconnectLayers(lgraph,s,d) disconnects the source layer s from the destination layer d in the layer graph lgraph. The new layer graph, newlgraph, contains the same layers as lgraph, but excludes the connection between s and d.

Examples

collapse all

Create a layer graph from an array of layers.

layers = [
imageInputLayer([28 28 1],'Name','input')
batchNormalizationLayer('Name','BN_1')
reluLayer('Name','relu_1')];

lgraph = layerGraph(layers);
figure
plot(lgraph) Disconnect the 'conv_1' layer from the 'BN_1' layer.

lgraph = disconnectLayers(lgraph,'conv_1','BN_1');
figure
plot(lgraph) Input Arguments

collapse all

Layer graph, specified as a LayerGraph object. To create a layer graph, use layerGraph.

Connection source, specified as a character vector or a string scalar.

• If the source layer has a single output, then s is the name of the layer.

• If the source layer has multiple outputs, then s is the layer name followed by the character / and the name of the layer output: 'layerName/outputName'.

Example: 'conv1'

Example: 'mpool/indices'

Connection destination, specified as a character vector or a string scalar.

• If the destination layer has a single input, then d is the name of the layer.

• If the destination layer has multiple inputs, then d is the layer name followed by the character / and the name of the layer input: 'layerName/inputName'.

Example: 'fc'
{"ft_lang_label":"__label__en","ft_lang_prob":0.6800366,"math_prob":0.8267242,"size":2539,"snap":"2019-43-2019-47","text_gpt3_token_len":614,"char_repetition_ratio":0.15069033,"word_repetition_ratio":0.13296399,"special_character_ratio":0.22095314,"punctuation_ratio":0.13738738,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9759261,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,1,null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-19T15:28:20Z\",\"WARC-Record-ID\":\"<urn:uuid:455f3c62-f00f-4ca2-9fca-26074d4b8253>\",\"Content-Length\":\"76658\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9f94b749-47a7-42f4-ac55-54fabd97bfb3>\",\"WARC-Concurrent-To\":\"<urn:uuid:21901f92-fba6-4078-a007-9ba011d1badf>\",\"WARC-IP-Address\":\"104.108.96.151\",\"WARC-Target-URI\":\"https://fr.mathworks.com/help/deeplearning/ref/disconnectlayers.html\",\"WARC-Payload-Digest\":\"sha1:OWAVZDT2CJCUVTMPTI43JWPONRAW443Z\",\"WARC-Block-Digest\":\"sha1:RJ6GBRWCJXVDKCFRGEH2SRH6VVW6Z743\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570986696339.42_warc_CC-MAIN-20191019141654-20191019165154-00388.warc.gz\"}"}