0

I was wondering if softmax is a must-have in a multi-class(more than 2) classification neural network? I was reading some stack-overflow topics and I saw people talking that it's necessary to have softmax at the last layer, but I am not sure if it really is necessary? (here is the link for the discussion https://stackoverflow.com/questions/70303466/do-i-need-to-apply-the-softmax-function-anywhere-in-my-multi-class-classificatio#:~:text=Yes%20you%20need,this%20is%20useful! ) as far as i know , what softmax does is just scaling the outputs to range between 0 and 1 and the sum to be 1. so i am not sure how it affects the whole network and loss calculation. thanks for your answers in advance.

Solruhama
  • 101
  • 7

1 Answers1

0

with softmax you get class probabilities which are easier to interpret. There is a good discussion here

One may say that a NN may learn probabilities directly. While this is possible - the numbers may not be that stable and they will not add precisely to 100%. This is where softmax helps.

If all you need is the index of the most probable class - you can use argmax without softmax at predict stage. But for the training stage you still need softmax.

Poe Dator
  • 4,535
  • 2
  • 14
  • 35