Home > other >  Matlab deep work designer generated code and set different structure, display layer is not connected
Matlab deep work designer generated code and set different structure, display layer is not connected

Time:09-16

Matlab version 64 2020 a, system Windows 10.
In matlab's official sample copy of the network structure of the code, (https://www.mathworks.com/help/d... Unfoldinglayer. HTML)

 filterSize=5; 
NumFilters=20.
NumHiddenUnits=200;
NumClasses=10;


the layers=[...SequenceInputLayer (6, the 'Name', 'input')

SequenceFoldingLayer (' Name ', 'a fold)

Convolution2dLayer (filterSize numFilters, 'Name', 'conv)
BatchNormalizationLayer (' Name ', 'bn)
ReluLayer (' Name ', 'relu)

SequenceUnfoldingLayer (' Name ', 'unfold)
FlattenLayer (' Name ', 'flatten')

OutputMode lstmLayer (numHiddenUnits, ' 'and' last ', 'Name', 'LSTM)

FullyConnectedLayer (numClasses, the 'Name', 'the fc)
SoftmaxLayer (' Name ', 'softmax')
ClassificationLayer (' Name ', 'classification')];

Lgraph=layerGraph (the layers);
Lgraph=connectLayers (lgraph, 'a fold/miniBatchSize', 'unfold/miniBatchSize');

Figure
The plot (lgraph)



Because want to change the classification of the last to return, so the code into deep work deginer to change the last layer to export, but after import the generated chart doesn't complete connection, as shown in figure, the error reason:
Layer 'conv: input size does not match, the size of the input layer with the expected input size to differ,
This layer of input:
From the layer 'fold' output 'out' output (size 6)
Layer 'fold' : not connected the output of each output must be connected to another layer of input,
The output of the detected not connected:
Output 'miniBatchSize'
Input layer 'unfold: not connected, each input must be connected to another layer of output,
Detected not connected input:
Enter 'miniBatchSize'

In deep work after connect input and output in the deginer to regenerate the code, code of the network part replacement, after the operation error, as above, but the plot (lgraph) to map the figure is connected,

Help: could you tell me why the code after import the generated chart and not the same as in the website? Why the connected network in the kit export after an error are not connected?

CodePudding user response:

this is a network that will be displayed after the import, the fold and unfold without complete connection

CodePudding user response:

this is to modify the generated code

CodePudding user response:

this is the plot (lgraph) of the figure, but an error or no connection
  • Related