I am trying to generate a mask to get the positive logits.
I get label_1 [1,2,3,4,7] and label_2 [1,2,7,2]
the goal is to get a 01 mask M, when i and j are the same class, Mij=1, others = 0
the above label_1 and label_2 could generate such mask with size[5,4]
Well, I do generate the mask by iteration, but I it is not efficient when labels get larger.