Commit ae6f6d56 authored by Louis Martin's avatar Louis Martin Committed by Myle Ott
Browse files

Fix call to non-existing to_string method

parent 2f781c5a
Loading
Loading
Loading
Loading
+1 −1
Changes for fairseq/dictionary.py: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ class Dictionary(object):
        Can optionally remove BPE symbols or escape <unk> words.
        """
        if torch.is_tensor(tensor) and tensor.dim() == 2:
            return '\n'.join(self.to_string(t) for t in tensor)
            return '\n'.join(self.string(t) for t in tensor)

        def token_string(i):
            if i == self.unk():