Convert the 1-D integer tensor labels into a one-hot encoded matrix with
num_classes columns: row i is all zeros except a 1 at column labels[i].
Input
labels = tensor([0, 2, 1, 3])
num_classes = 4
Output
tensor([[1, 0, 0, 0],
[0, 0, 1, 0],
[0, 1, 0, 0],
[0, 0, 0, 1]])