Oh my god… It is perfectly work.
I didn’t care that the Loss function internally contains the softmax function.
I need to do study more harder and harder. XD
And for your question below,
one_hot_encoder = OneHotEncoder(categories='auto')
labels = one_hot_encoder.fit_transform(labels).toarray()

I changed the one-hot encoded labels into class indices as follows.
tensor_y = torch.argmax(tensor_y, dim=1)

Really thank you for your help. I posted kinda same question just before.
Is there a way to check the question has been solved?