I am using CNN for Sentence Classification code by Yoonkim. This is used for text classification. I noticed that he uses softmax layer and negative log likelihood error. This is optimal for single label multiclass classification. I now have a dataset which is for multilabel-multiclass classification.

  1. What are the ideal activation methods and error functions to use?
  2. I felt that, using softmax layer will give the sum of probabilities as 1 but in this case since it belongs to different labels, at each instance we might have high probability for each class. So I believe that Softmax is not an ideal option. Am I right?
  3. I find data for images but nothing prominent for text. Can anyone refer me to some source?

1 Answer 1


Assuming all the labels have the same importance you can have a sigmoid for every class at the output. For each of the classes it will ask, is this class part of this sentence or not? The loss is just the sum of the individual log losses for the outputs. If some labels are more important you can scale them accordingly in your loss function.


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.