Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AI and Deep Learning by (50.2k points)

According to Wikipedia (which is a bad source, I know) A neural network is comprised of

  • An input layer of A neurons

  • Multiple (B) Hidden layers each comprised of C neurons.

  • An output layer of "D" neurons.

I understand what does input and output layers mean.

My question is how to determine an optimal amount of layers and neuron-per-layer?

  • What is the advantage/disadvantage of an increasing "B"?

  • What is the advantage/disadvantage of an increasing "C"?

  • What is the difference between increasing "B" vs. "C"?

Is it only the amount of time (limits of processing power) or will make the network deeper limit quality of results and should I focus more on depth (more layers) or on breadth (more neurons per layer)?

1 Answer

0 votes
by (107k points)

Answering your first question, for most of the problems, one layer is enough for the model. At max, you can add two layers depending upon the need of the model.

Hidden layers are the magic of neural nets. they help to separate your training data. You can increase the number of neurons in a particular hidden layer or you can increase the number of hidden layers or both. if you Increase the number of neurons it will allow you to decrease your training error but it also reduces the amount of generalization, which can be very important depending on your problem. This balance is something you learn to manage the more times you do it. Each problem is different. When you add the layers, you will automatically increase the dimensional complexity of the data you can learn. Whenever you add a layer in your model, you change the shape of the discriminator. If you add more hidden units and layers, you can learn complex hyperplanes. Once you are done with establishing a configuration and trained it, you can’t add or remove units or layers.

You can refer the following link for better understanding of ANN:

https://intellipaat.com/blog/what-is-artificial-neural-network/

If you wish to learn more about Artificial Neural Network then visit this Artificial Neural Network Tutorial.

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...