Neural network inputconnect automatically set to 0 after "train" was called
Afficher commentaires plus anciens
Hi,
I'm using neural network toolbox and having some problems. Here's the code
net = patternnet([]);
net = configure(net, trainF, trainL);
net.divideFcn = '';
net.performParam.regularization = lambda;
net.layers{1}.transferFcn = 'softmax';
net.trainFcn = 'traingd';
net.trainParam.epochs = 10000;
net.trainParam.show = 500;
net.trainParam.lr = alpha;
net.view
net = train(net, trainF, trainL);
The problem is that after running, the IW is empty. I tried to print out the 'inputconnect' after each line was executed, and the result suggested that the inputconnect became 0 after 'train' was called. So before training, the network looked like this, which is what I want

After training, it became like this

I'd be very grateful if anyone can help figure out how to fix it, thanks
1 commentaire
Greg Heath
le 7 Mai 2015
If you are going to post patternnet code
1. Make sure it runs when cut and pasted into the command line
2. Show the results of running it on either
a. The iris_dataset in the help and doc documentation
help patternnet
doc patternnet
b. Another MATLAB classification dataset example obtained from
help nndatasets
doc nndatasets
3. Fix your code as suggested in 2 and repost.
Hope this helps.
Greg
Réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox 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!