Ignore_label for nn.BCEWithLogitsLoss

Hello,
I’m doing multi-label semantic segmentation using nn.BCEWithLogitsLoss. How can I ignore some labels during training?

Thank you!

PS: Question about BCE* losses interface and features doesn’t reply to this question

I found one solution: Ignore padding area in loss computation