krishna511:

‘tuple’ object has no attribute 'log_softmax’


This is occuring because your model’s forward gives u two outputs output_logits, output_softmax  , the loss criterion which is crossnetropyloss here expects one of those as a tensor but currently its a tuple just change the line

pred_emo= model(X)

to

logits,softmax = model(X)

and pass accordingly to ur criterion and u r good to go