I have a multi-label classification problem (A single sample can be classified as several classes at the same time).
I want to use torch.nn.MultiLabelSoftMarginLoss but I got confused with the documentation where the ground truth are written like this :
Target: (N, C)(N,C) , label targets padded by -1 ensuring same shape as the input.
Does that mean the target is in one hot form, but the zero replace with -1?
Let's say I want to classified several attributes for object detection such as : Man, Tall, Long hair.
My first image is a tall woman with long hair, does my Target become 0 1 1 or -1 1 1 ? I can't fathom why use -1 instead of 0
It's quite hard to find example in internet since a lot of people mistook multi-label task as multiple class classification and keep using BCELoss.
