Loading fairseq/dictionary.py +1 −1 Changes for fairseq/dictionary.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -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(): Loading Loading
fairseq/dictionary.py +1 −1 Changes for fairseq/dictionary.py: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -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(): Loading