input seems to be a tuple while you are expecting a tensor on which you could use .log_softmax. I’m not familiar with your use case and thus don’t know what input contains but you might want to unwrap or index it instead before using log_softmax.