I am trying to train and predict SVHN dataset (VGG architecture). I get very high validate/test accuracy by just getting the largest output class. However, the output weights are of large positive and negative numbers. Are they supposed to parsed as exp(output)/sum(exp(output)) to be converted to probability? Thank you!


1 Answer 1


The numbers to which you are referring are probably the logits of the NN. The logits have to be transformed using a activation function which could be:

  • Softmax ( which you showed ) for classification tasks.

  • Linear activation function for regression tasks.

Softmax activation function :

The mathematical notion is as follows:

$\Large S( y_i ) = \frac{ e^{y_i}}{ \sum e^{y_i} }$

It converts the logits to class probabilities that sum to 1. It is widely used in multiclass classification problems.

CNNs for classification need to produce class probabilities which are produced by a softmax activation function at the output layer.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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