Hi,
I am training a modified vgg11 net on a dataset of images. I want to predict 40 labels (I use a 1D vector of length 40 with ones on the places that label is active). One image can have multiple labels (most are not exclusive, some are). Also my dataset has quite some imbalance. It is hard to balance it because there most of the times are multiple labels in the image. The final activation layer is a sigmoid function with 40 output nodes.
Which loss function is good for this purpose? I see that nn.NLLLoss gives me the possibility to weight the classes, where nn.MultiLabelMarginLoss don’t.
And when should I use MultiLabelSoftMarginLoss vs MultiLabelMarginLoss?