Saewon_Yang:

why do we have to make reduction=‘none’ with multi-label problem?


You don’t have to use reduction=none, but question in this topic was how to multiply each class prediction with a certain weight, so this is a valid approach.



 Saewon_Yang:

but how do we get the weights?


I’m not sure how @MultiSeedLoaf got the weights, so we might wait for his answer.
A simple approach would be to use the inverse of the class count, but I’m not sure if that’s the best approach for a multi-label classification.



 Saewon_Yang:

whats the difference between multiplying weights to ‘none’ and multiplying weight to ‘mean’.


If you use reduction='mean', you’ll get a single scalar, so that you cannot multiply the loss with the class weights anymore.