1
$\begingroup$

I have noticed that almost all tutorials take the number of neurons as a power of 2. Is there any proper mathematical and well-proven reason for that?

If you sometimes change it to some other odd value, then we get a very long and weird error calling about a dozen things making the traceback of a page. Is there any reason for that?

I had tried it on a text predicting RNN with some GRU and LSTM layers mixed (bidirectional). I changed the no. of neuron units and It also resulted in an error. So, any ideas/theories?

$\endgroup$
  • $\begingroup$ Hi and welcome to AI SE! You say "If you sometimes change it to some other odd value, then we get a very long and weird error calling about a dozen things making the traceback of a page", but I don't think this is caused by the fact that the number of neurons is not a power of 2. So, can you provide a concrete example where that occurs? Also, note that, for each layer, you may have a different number of neurons. $\endgroup$ – nbro Apr 21 at 20:54
  • $\begingroup$ @nbro, No I do not have a concrete example. I have just migrated to another OS so most of my code is lost. But even then in most tutorials the no. is always a power of 2. So I was wondering what reason was there behind it..... $\endgroup$ – neel g Apr 22 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.