kedar:

Maybe in that case BCEWithLogitsLoss with pos_weight = [3052/948, 3425/575, 3083/917, 3328/671] and weight = [1/948, 1/575, 1/917, 1/672] (as in MultiLabelSoftMarginLoss)? What do you think about it?


I was also thinking about this approach while reading your post, so I would at least try it and see, if your training benefits from it.