Hello everyone, I’m a new in pytorch and it’s quite great.But I have some problem when using the BCELoss and I have tried to find answer in the forum but it doen’t work. So I have to creat a topic.
Now I am solving a problem about the multilabel classification and use the BCEWithLogitsLoss ( just define learning rate). I have 500 label, each label can be 0 or 1, and 0 is much more than 1.(Only in first 2 label, 0 and 1 are approximatly equall).
When I try to train it. First, the loss is about 0.69, and it decreace quickly to 0.1 in 1 epoch. And then loss basically do not fall. And i try to print the output (before the sigmoid) and the label. Find that all the value are negative.
I feel very strange. And I just guess if it’s because that in label 0 is much more than 1? And the output almost are negative. If it is, whether i should use the pos_weight?