BP Neural Network
Ältere Kommentare anzeigen
Hi, I want to implement some custom BP Neural Networks with MATLAB! I have an aging database that contains face features (68 pairs of face points), gender and age. so I have a [1002x138] matrix as input datas for NN. 1002 face features and 138 value for each face...
face features must classify to 4 groups of ages [1-12,13-25,26-45,46-63] by NN.
Back-propagation network features : 136(68x2) Input values, 2 hidden layers, 4 output values (boolean type).
To achieve my target, I need to construct five NNs. The first NN is the main neural network. The main NN is concern with the main age classification with four outputs as I mentioned before. The other four NNs are concern with secondary age classification. Each neural network (the five networks) has 68 pairs of inputs representing the face features in addition to the gender of the person. It is also to be noted that we need two hidden layers, one hidden layer is to correlate each pair in one meaningful unit and the second is consider to be the real hidden layer after organizing the input data in the first hidden layer. The gender is connected directly to the second hidden layer. The number of outputs for each NN related to secondary classification is two representing the more specific age range in its domain.
I did read this article : (<http://web.eecs.umich.edu/~someshs/nn/matlab_nn_starter.htm>) but finally I've never been success in nnetwork creation.
It's my network definition :
net =network;
net.numInputs=138;
for i=1:136
net.inputs{i}.size = 1;
end
net.numLayers = 3;
net.layers{1}.size = 69;
net.layers{2}.size = 69;
net.layers{3}.size = 4;
net.inputConnect(1) = 1;
net.layerConnect(2, 1) = 1;
net.layerConnect(3, 2) = 1;
net.outputConnect(3) = 1;
net.targetConnect(3) = 1;
net.layers{1}.transferFcn = 'logsig';
net.layers{2}.transferFcn = 'purelin';
net.layers{3}.transferFcn = 'purelin';
net.biasConnect(1) = 1;
net.biasConnect(2) = 1; %how can I connect this bias to gender?
net.biasConnect(3) = 1;
net.initFcn = 'initlay';
net = init(net);
net.performFcn = 'mse';
net.trainFcn = 'trainlm';
I want to know how can I define, connect, train and test these networks using matlab?
Thanks guys.
3 Kommentare
Greg Heath
am 18 Apr. 2012
There is no such thing as a BP Neural Network. There are a number of NN training algorithms. BP is just the initials of the most common one. I assume you mean a feedforward multilayer perceptron (FFMLP or just MLP). Given a trained FFMLP you cannot tell if it was trained by BP or another training algorithm.
What version of the NNToolbox do you have?
Do you have access to source code via the function TYPE?
type feedforward
Hope this helps.
Greg
Greg Heath
am 18 Apr. 2012
Have you considered k-means clustering, using a radial basis function net or using a LVQ net? These aproaches tend to allow a better visualization and understanding of the class division.
Hope this helps.
Greg
Younes Jafari
am 26 Apr. 2012
Akzeptierte Antwort
Weitere Antworten (1)
Younes Jafari
am 26 Apr. 2012
0 Stimmen
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!