I have a Multi-Labeling Multi-Classification problem and I am wondering which loss function should I use.
My labels are positions and types of objects. There is 64 positions and each item could be 0,1,2
Example for label is: [0., 0., 0., 2., 0., 0., 0., 0., 2., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 2., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 2., 0., 0., 0., 0.]
0 means there is no object on this position
1 means there is an object on this position from type 1
and 2 means there is an object on this position from type 2
I have checked the BCEWithLogitsLoss and this post, and I am not sure whether it applies to my problem. I tested the BCEWithLogitsLoss function with one example and the result did not make sense, when output = target the result is bigger than 0 (it is 0.68) and when output != target the result is bigger (0.70). In the example I replaced the 2 with 0.5, since the targets t[i]
should be numbers between 0 and 1.