It depends what your use case is. The actual values will of course be different, but the maximal index will be the same, so you can use it to get the predicted class (most likely class).
However, you need to be careful, if you want to calculate a loss with these values and should use logits for e.g. nn.CrossEntropyLoss.



 cevvalu:

"yhat = np.argmax(yhat.to(“cpu”).detach().numpy()) "


This should work, if you specify the right dimension for the argmax operation. Usually the class dimension would be dim1.