I start to learn artificial neural network and all introduction that I have found on internet present architecture with a number of input variable, so the input layer has the same number of "neurons" as number of variable. Then a number of neurons in hidden layers and only one output neurons.

Does it make sense to have several output neurons ? Is it the same method but with more neurons at the end ?

I have try to do some tests in fortran90, starting from a basic example, but I start to get confused to make it with more than one output neurons



To be more clear : is there a way to create an ANN with various output neurons that can take different states ? (without making a correspondence between K class corresponding to each possible output)

I would like to have 3 output neurons that will take the following states :

Inputs X  |  Outputs Y
0 0 0 1 0 |   0 0 0
1 0 0 1 1 |   1 1 0
1 1 0 1 1 |   0 1 1
1 0 0 0 1 |   1 1 1
0 0 0 0 0 |   1 0 0

if yes what is the methods ?

  • $\begingroup$ When you say "one output neuron", do you really mean one output, or one cost? Most introductions to neural net use multiple output but only one cost. For example, the first figure on the wiki page has two output neurons. $\endgroup$ – user172818 May 6 '17 at 1:15
  • $\begingroup$ yes that what I want like in this figure, but things are unclear for me for this last layer (output), I did a small algorithm in fortran90 with 9 input (0/1), one hidden layer, and one output, it work well, but for more output it does not at all.... $\endgroup$ – Dadep May 6 '17 at 14:24

It's possible to have more than one neuron in the output. The softmax function is used for that purpose. With this function, the output may have $K$ classes. If we have a network with $K = 3$ output classes, and some input shall belong to class $k = 1$, for example, the desired output would be: $[1 0 0]$. If another input shall belong to class $k = 2$, then the desired output would be $[0 1 0]$. And so on.

  • $\begingroup$ thanks a lot it help, my problem is not a classification problem, I would like to have directly the output state (see EDIT in my post) $\endgroup$ – Dadep May 6 '17 at 18:18
  • 1
    $\begingroup$ In some sense it is still classification - just with multiple labels (multilabel classification). [101] e.g. says that the example belongs to classes 0 and 2. Binary cross entropy would then be more appropriate than categorical cross entropy (Softmax) though. $\endgroup$ – thertweck May 9 '17 at 9:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.