Massivaa:

I have already tried to do LogSoftmax but it gives an incorrect result


How do these incorrect results look?



 Massivaa:

what I mean by “a good precision and an incorrect result” is that when training the data the code gives a good occuracy but when I test the code it gives an incorrect result so
I can’t understand if the problem is in the model or in the data processing (first part).


This sounds as if your model is overfitting, so you might need to add more regularization to your training (e.g. via dropout layers etc.).