Hi Everyone,
I’m trying to use pytorch for a multilabel classification, has anyone done this yet?
I have a total of 505 target labels, and samples have multiple labels (varying number per sample).
I tried to solve this by banalizing my labels by making the output for each sample a 505 length vector with 1 at position i, if it maps to label i, and 0 if it doesn’t map to label i.
Then, I tried to use the multilabelmarginloss().
Problem I’m facing - with more iterations, the output of the model should move towards a sparse vector with most elements 0 and a few elements 1, but it is actually moving towards a vector with often very large negative values.
Can some one tell me how to go about this?
Thanks!