I’ m doing a multi-label classification problem of 15 classes. The net I’ m using is a Resnet50 with the last layer’s output to be 11. The loss function is BCEWithLogitsLoss.
I have around 12000 labeled pictures. However, the label matrix is sparse. That is to say for every picture, maybe only 1 to 2 classes will be active. Also there are a few pictures labeled all zeros.
First when I trained, the net tended to give me all zero result, which seems to be a local minimum.
Then I drop these all zero samples and use pos_weight parameters in the BCEloss to balance different classes. But the net still tends to give me the same result. (all zero predictions)
I wonder if there’s any method to give false negative mistakes more punishment which may help the net to predict more positive result.
Thanks a lot!