It seems you are using F.cross_entropy as your loss function, which will not accept one-hot encoded target. Instead the target should contain the class indices and have the shape [batch_size] for a multi-class classification.
Did you also check the loss curves and the accuracy? Is the accuracy going up?