How can I add layers to a neural network in MATLAB ANN toolbox?

I want to use MATLAB ANN toolbox to construct a neural network with three hidden layers, but in the toolbox I found that the default setting is that there is only one hidden layer, how can I add layers to this network?
Thanks!

 採用された回答

Greg Heath
Greg Heath 2015 年 6 月 12 日

0 投票

net = fitnet([H1 H2 H3]);
However, why in the world would you want to complicate an already universal approximator by adding two more hidden layers?

2 件のコメント

Wei Chen
Wei Chen 2015 年 6 月 12 日
Thanks! I am going to use three hidden layers because I need to construct an auto-encoder. Its structure is shown here: http://www.nlpca.org/fig_NLPCA_bottleneck_autoassociative_autoencoder_neural_network.png
Mahmoud Elbeltagy
Mahmoud Elbeltagy 2020 年 9 月 14 日
As mentioned in Ian Goodfellow Book "Deep Learning", adding depth to the neural network reduces the number of neurons required to fit the data. And also as mentioned by him, adding extra layers comes from the belief that basic features are used to produce more complex features as you move uo in the layers heirarchy.
"In many cases, the number of hidden units required by the shallow model is exponential in n." Deep Learning book
P199
"Choosing a deep model encodes a very general belief that the function we want to learn should involve composition of several simpler functions" P201

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および 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