Member-only story
How Many Neurons for the Output Layer?
There are a lot of explanations elsewhere, here I’d like to share some example questions in an interview setting.
When building a neural network model, how many neurons in the output layer should you have for a classification problem? How many for a regression problem?
Here are some tips for readers’ reference:
For a classification problem, you should have the same number of neurons as the number of classes in the output layer; for a regression problem, you should have one neuron in the output layer.
Let’s check out how Kian Katanforoosh explains it!
In addition, if you have a simple binary classification, you can use one node and a sigmoid activation which gives you the logistic regression.
Happy practicing!
Thanks for reading my newsletter. You can follow me on Linkedin or Twitter @Angelina_Magr !
Note: There are different angles to answer an interview question. The author of this newsletter does not try to find a reference that answers a question exhaustively. Rather, the author would like to share some quick insights and help the readers to think, practice and do further research as necessary.
Source of video: Stanford CS229 Lecture 11 (Autumn 2018) — Introduction to Neural Networks by Kian Katanforoosh
Good reads: Blog. The mostly complete chart of Neural Networks, explained
Blog. Rules-of-thumb for building a Neural Network