HI, it depends on your loss function, but some PyTorch’s loss functions take class labels as their targets(e.g. NLLloss 4.4k). So if you use them, you don’t need to convert targets into onehot vectors.