How to do multi-label classification with labels of the form [1 -1 0]?

I have a multi-label classification problem of class A, B and C, where an image could be labeled positive for class A, negative for class B and unknown for class C, ground truth labels of this image are represented as a vector [1 -1 0] for class A,B and C respectively. I’ve seen examples of multi-label classification problems where a sigmoid followed by a cross entropy with logits were used to calculate the loss, but labels were whether 1 or 0 for positive or negative, how can i modify the loss to take care of the -1 (unknown case) or is there a better representation of the input labels to handle the 3 cases ?

transform label -1 to label 2 would be just fine for cross enropy loss.

1 Like

Do you have different folders for respective class?

i will give that a try thank you.

no, all images are in one folder and their meta-data (img path and labels) is in a separate textfile