Well, if your target is (either 0 or 1) and one sample might have multiple ones, I think it’s a multi-label classification task, but please correct me, if I’m wrong.
If that’s the case, you can apply sigmoid on your output, making it possible to output several classes for each sample, and use BCELoss.