@jingweiz
What problems are you trying to solve?
Supposing you want to give rare label combinations more weight, you can pass a weight parameter to BCELoss. If you have 4 label A, B, C, D, you can do
criterion = torch.nn.BCELoss(weight = torch.Tensor([1, 2, 3, 4])).cuda()
Supposing you really want more weight for some specific samples you can use WeightedRandomSampler to have them appear more frequently in your batch.
Otherwise do as @ajbrock says and roll up your custom code