Fix call to non-existing to_string method
MODIFY
fairseq/dictionary.py
fairseq/dictionary.py
@@ -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():

Fix call to non-existing to_string method