Newbie question on how to change default settings for feedforwardnet

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Greg Heath
Greg Heath el 25 de Jul. de 2012
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 comentarios
huang
huang el 17 de Oct. de 2013
thank you!very detail answer
Image Analyst
Image Analyst el 29 de Oct. de 2013
I marked Greg's answer as Accepted, because you forgot to.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by