For loop defining the network architecture
Afficher commentaires plus anciens
% Solve an Input-Output Fitting problem with a Neural Network
% Script generated by Neural Fitting app
% Created 26-Apr-2020 11:07:28
%
% This script assumes these variables are defined:
%
% Einleger_Binaer_Alle_inv_sortiert - input data.
% Auslenkung_Alle_inv - target data.
x = Einleger_Binaer_Alle_inv_Sortiert;
t = Auslenkung_Alle_inv;
rng('default');
% Choose a Training Function
% For a list of all training functions type: help nntrain
% 'trainlm' is usually fastest.
% 'trainbr' takes longer but may be better for challenging problems.
% 'trainscg' uses less memory. Suitable in low memory situations.
trainFcn = 'trainlm'; % nicht Levenberg-Marquardt backpropagation, da schneller
% Create a Fitting Network
% hiddenLayerSize = 10;
% net_hiddenlayersize6_sortiert = fitnet(hiddenLayerSize,trainFcn);
% For more hidden layers, layer construction
hiddenLayer1Size = 10;
hiddenLayer2Size = 10;
net = fitnet([hiddenLayer1Size hiddenLayer2Size], trainFcn);
Hi
Now I have a neural network with two hidden layers. i want to expand it for more hidden layers.
Can I use a for-loop for layer construction? And if it is possible, how can I write it?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Define Shallow Neural Network Architectures dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!