Oh ok I think it wasmisinterpreting the output… so e.g.
labels = torch.tensor([1, 4, 1, 0, 5, 2])
labels = labels.unsqueeze(0)
target = torch.zeros(labels.size(0), 6).scatter_(1, labels, 1.)
print(target)

will give output
tensor([[1., 1., 1., 0., 1., 1.]]) meaning no classes 3 was found right?
Regarding the labels, it was a  typo in terms of “6” cause I was just giving an example and gave random numbers, but I do indeed use 0-based indices in my code. And regarding “2” it is not a typo, since some training batches may contain more genres from one class than another.