beinando
beinando

Reputation: 497

Matlab - replace classification layer using a script (automatically)

i want to train a neural network with flexible output size. In the beginning, i used the matlab deep network designer to manually replace the classification and fully connected layer to the desired output size. Now, i want to automatically replace it, using a script.

Which command is working for that? Simply trying the line:

net.Layers(142,1).InputSize = 10;

gives me the error message

Unable to set the 'InputSize' property of class 'FullyConnectedLayer' because it is read-only.

Trying to replace the complete layer (not only inputsize) is resulting in the same error message.

Is this possible with matlab, and if yes, which commands will do the job?

Thanks in advance!

Upvotes: 0

Views: 199

Answers (1)

beinando
beinando

Reputation: 497

Okay, i think i solved it. When changing the network manually inside of the deepnetworkdesigner, there is the possibility to click "export code" which exports the desired code for the adapted output size

Upvotes: 0

Related Questions