Thanks for your time.
So if I understood correctly, if I have a situation like this:
labels = [2, 2, 1, 3]

I calculate weights
weights = [0.2, 0.2, 0.4, 0.4]

but to the loss functions I should pass them as
weights = [0.4, 0.2, 0.4, 0.4]

because classes are assigned from 0 to num_classes, so  [1, 2, 2, 3]
Am I right?