Define Multilayer perceptron with 28 neuron in hidden layer

조회 수: 4 (최근 30일)
HRK
HRK 2012년 7월 18일
hi
I have problem with define Multilayer perceptron neural network.first I create a mlp with newp() function and try to 28 neuron for network but trainc can not perform then create a feedforward network with hardlim and 28 neuron in hidden layer and perform trainc and try to make this network like a mlp but did not work again if i change network training minimum gradiant reached very soon. however how can I make a mlp network for calassification with n neuron in hidden layer?

채택된 답변

Greg Heath
Greg Heath 2012년 7월 19일
Try to run the classification examples and demos in the documentation. Use the commands help and doc to better understand all of the functions you will use. For example:
help newpr
doc newpr
or the newer
help/doc patternnet
For c classes use target matrices with columns from the unit matrix eye(c). Use ind2vec for converting class indices (1:c) to unit matrix columns.
Use tansig hidden node activation functions, a softmax output activation function and the trainscg training function.
The number of hidden nodes is obtained by trial and error. I try to use the smallest acceptable value.
Each input column vector is assigned to the class corresponding to the maximum component of the corresponding unit output column vector. The index of the assigned class can be obtained using vec2ind.
The number of classification errors is obtained from
sum(assignedclassindex ~= targetclassindex)
  댓글 수: 1
Greg Heath
Greg Heath 2012년 7월 19일
편집: Greg Heath 2012년 7월 19일
What is the size of your input and target matrices?
Why do you want 28 hidden nodes?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by