BCELoss with weights for positive labels

Could anyone explain how to reduce BCELoss with weight for positive targets described in issues to multiplication as @smth proposed? I’ve tried to use vectors as weights and other tricks but these approaches are too complex. It’s quite important for my current project. I’ve implemented a class for it but if there is simpler way it would be great. :slight_smile:

P.S. My question on StackOverflow

this is my mistake to not have re-visited earlier. I’ve posted on the original issue and revisited.

1 Like