// append new hidded states to the current list of the hidden states
self.lang_hs.append(lang_hs.squeeze(1))
// first add the special "THEM:" token
self.words.append(self.model.word2var("THEM:"))
// then read the utterance
self.words.append(Variable(inpt))
assert (torch.cat(self.words).size()[0] == torch.cat(self.lang_hs).size()[0])
After Change
// append new hidded states to the current list of the hidden states
self.lang_hs.append(lang_hs.squeeze(1))
// first add the special "THEM:" token
self.words.append(self.model.word2var("THEM:").unsqueeze(1))
// then read the utterance
self.words.append(Variable(inpt))
assert (torch.cat(self.words).size()[0] == torch.cat(self.lang_hs).size()[0])