Reading PyTorch docs BCEWithLogitsLoss:
where c is the class number (c > 1 for multi-label binary classification, c = 1 for single-label binary classification), nn is the number of the sample in the batch and p_cp c is the weight of the positive answer for the class cc .
What is the multi-label binary classification? Binary assume only two labels AFIK
Multi-label in terms of binary classification means that both the classes can be true class for a single example.
For example, in case of dog-cat classifier, for an image containing both dog and cat, it'll predict both dog and cat.
In the multi-label problem there is no constraint on how many of the classes the instance can be assigned to. Wiki
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With