facebookresearch / XLM

PyTorch original implementation of Cross-lingual Language Model Pretraining.
Other
2.87k stars 495 forks source link

Error when using the uploaded en-fr model for NMT (translate from English to French) #342

Open Anwarvic opened 2 years ago

Anwarvic commented 2 years ago

Thank you so much for the great effort you put into creating such a powerful model.

When I tried using the en-fr model you uploaded to the README file by running the command suggested in issue #123, it throws the following error:

Traceback (most recent call last):
  File "translate.py", line 141, in <module>
    main(params)
  File "translate.py", line 71, in main
    setattr(params, name, getattr(model_params, name))
AttributeError: 'AttrDict' object has no attribute 'bos_index'
saikoneru commented 2 years ago

Not sure but seems like they didn't use bos_index from the issue #338. So maybe you could remove the 'bos_index' when reloading the params?