Newbie question on how to change default settings for feedforwardnet

2 ビュー (過去 30 日間)
Jo John
Jo John 2012 年 7 月 22 日
コメント済み: Image Analyst 2013 年 10 月 29 日
I am learning neural networks via MATLAB 2012a, I followed some examples. In one of the examples I found internet, create a feed forward net with 2 hidden layers, the first layer has 3 neurons and the second layer has 1 neuron. From the default feed forward net created by: net = feedforwardnet I can see there are 2 hidden layers, but I can not see how many neurons are there in each layer.
Please advice how I can find the settings in each layer for how many neurons are in the layer? Besides, how I can change it?
I found an old syntax seems to be able to do this quite easily: net = newff([1969, 1989; 1,12], [3, 1], {‘tangsig’, ‘purelin’}, traind) However, in MATLAB 2012a, the above syntax is obsolete, please let me know how I can do the same job with feedforwardnet?
Thanks, John

採用された回答

Greg Heath
Greg Heath 2012 年 7 月 25 日
1. Your example only has 1 hidden layer. The other layer is the output layer. I sincerely doubt that you will ever have to use two hidden layers.
For two hidden layers:
newff([minmax(x),t,[H1 H2 O],...)% Ancient ( O = size(t,1) )
newff(x,t,[H1 H2],...) % Very Old
newfit(x,t,[H1 H2],...) % Old
fitnet(x,t,[H1 H2],...) % Current
2. If you have 2012a
a. Forget about feedforwardnet (automatically called by fitnet and patternnet)
b. Use fitnet for regression and curvefitting
c. Use patternnet for pattern recognition and classification
3. Read the documentation to better understand
help fitnet
doc fitnet
help/doc patternnet
help/doc feedforwardnet
help/doc newff
4. Run some of the examples and/or demos WITH THE ENDING SEMICOLONS REMOVED!
5. Study the resulting command line output.
Hope this helps.
Greg
  2 件のコメント
huang
huang 2013 年 10 月 17 日
thank you!very detail answer
Image Analyst
Image Analyst 2013 年 10 月 29 日
I marked Greg's answer as Accepted, because you forgot to.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by