Define Multilayer perceptron with 28 neuron in hidden layer
4 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
採用された回答
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
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!