I don’t know how MultiLabelSoftMarginLoss would compare to BCEWithLogitsLoss, so let’s wait for some experts to chime in.
In case you are dealing with a multi-label classification, pos_weight should get a value for each class, i.e. it should be a tensor containing nb_classes values defined as [nb_neg_class0/nb_pos_class0, nb_neg_class1/nb_pos_class1, ...].