tztztztztz/eqlv2

About use_sigmoid and softmax cross_entropy

Never-Walk-Away opened this issue · 2 comments

Hi, there is have a question about the the loss_cls of bbox_head of roi_head.
i think the final calssifier is a Multi classification. why choose sigmoid function instead of softmax function.

I use the sigmoid loss function to model the detection problem as a set of independent tasks, that is: for each proposal, we estimated the probability of being each category, then output all those boxes.

In fact, even with softmax loss, instead of outputting a single box with the highest probability, we output <num_classes> boxes with the corresponding prob.

If you just want to output a single box for a single proposal, you can choose the box with the highest probability, which you can do it in sigmoid as well.

Thank you for your reply! Best wishes for you~~~