+1 vote
in Machine Learning by (250 points)
Is there any method to find out the number of layers and the number of neurons per layer? As input I solely have the size of the input vector, the size of the output vector and the size of the training set.

We can find out the best net by trying different net topologies and choosing among the one with the least error. Unfortunately I can't try this.

1 Answer

+4 votes
by (10.9k points)
edited by

@ganga , You may try these approach :

1.Use different configuration:

 Divide your training set into two parts: one for training and the other for validation, then try to train and evaluate using different approaches and find what works the best.

 2.A rule of thumb:

 As per guesses, people can come up with a rough idea with the number of neurons in the hidden layer they are as follows:

  • Neurons should be placed between the input and output layers.
  • Should be set to something around (input+output)x(2/3).
  • It must not be larger than twice the size of the input layer.

3. An algorithm which dynamically adjusts the network configuration:

Using algorithms like cascade correlation which starts with a minimal network and eventually adds hidden nodes during the training, this makes your code simpler and enhances your performance.

 Hope this answer helps.

Visit here to know more about the Artificial Neural Network.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !