I have a multioutput multiclass classification task to predict, for each sample, 3 labels, the value of each of which can be an integer from 1 to 10 without repetition (e.g., [1,5,8]). Since the order of the predicted labels is not relevant for my task, I am struggling to write a permutation-invariant loss function in Tensorflow (i.e., the predicted numbers should be compared to all permutations of the gold labels, and the comparison returning the lowest score be chosen): I have not found any easily reusable code online: any suggestion?
Best,
Livio