one-hot can help, for example:
one image raw label is  [1, 3, 5]; then transform to one-hot form as [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0 , 0, 0],
outputs shape is (n, 13), then use BCEWithLogitsLoss as loss function, I think @MariosOreo’s solution is right.