diff --git a/src/runners/inference.py b/src/runners/inference.py index 0fd2cfa..068ef6b 100644 --- a/src/runners/inference.py +++ b/src/runners/inference.py @@ -99,7 +99,7 @@ def batch_inference(self, sent_batch, desired_lengths): self.model.eval() batch_size = len(sent_batch) - ids, lengths = self.dictionary.sentences2ids( + ids, lengths, _ = self.dictionary.sentences2ids( sent_batch, sos=False, eos=True) ids_batch = self.device(Variable(torch.LongTensor(ids), volatile=True)) hidden = self.device(self.model.encoder.initial_hidden(batch_size))