Solved by ice_climber in post #2 
              
              
                For anyone else with a similar issue, I got it to work. I removed the log_softmax calculation, so this: 
tag_space = self.hidden2tag(outputs)
tag_scores = F.log_softmax(tag_space, dim=0)
return tag_scores[-1]

becomes this: 
tag_space = self.hidden2tag(outputs)
return tag_space[-1]

I also changed N…