Clear Filters
Clear Filters

How to optimize Hidden Nodes in each hidden layer ?

1 view (last 30 days)
I am trying to design a 5 layer MLP model .
Description: Input Layer : 1; 2 number of inputs
Output Layer: 1; 1 number of output
Hidden Layer: 2
I want to learn how I can select the number of neurons in each hidden layer and how to justify such selection.

Accepted Answer

Muskan
Muskan on 15 May 2023
Hi Rajeev,
As per my understanding of the question, the number of hidden nodes should be chosen based on the number of features in the input layer and the number of output nodes. There is a rule of thumb that says the number of hidden nodes should be somewhere between the number of input features and the number of output nodes. This is just a starting point, and you should experiment with different numbers to see what works best for your specific problem.
Moreover, the number of neurons and number layers required for the hidden layer also depends upon training cases, amount of outliers, the complexity of, data that is to be learned, and the type of activation functions used.
I hope the above information helps resolve your query.
Thanks

More Answers (0)

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!