You could use nn.BCELoss with a sigmoid as the last non-linearity or directly pass the logits to nn.BCEwithLogitsLoss.
Your target should be a multi-hot encoded tensor, i.e. the true classes should be passed as ones while the others as zeros.