-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error(s) in loading state_dict for TransformerModel: #3
Comments
This is weird, it should work. Maybe some fairseq-padding option. Try to use the more recent ones.
|
Error on Gogle colab , invoking "mm-all-iter0" | [src] dictionary: 40897 types
| [tgt] dictionary: 40897 types
/content/MyDrive/ColabNotebooks/ilmulti-master/ilmulti/translator/translator.py:23: UserWarning: utils.load_ensemble_for_inference is deprecated. Please use checkpoint_utils.load_model_ensemble instead.
self.models, model_args = fairseq.utils.load_ensemble_for_inference(model_paths, self.task, model_arg_overrides=eval(args.model_overrides))
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-8-cba9eb6f9aca> in <module>()
2 from ilmulti.translator import from_pretrained
3 translator = from_pretrained(tag='mm-all-iter0')
----> 4 sample = translator('I am going', tgt_lang = 'hi')
5 print(sample)
5 frames
/usr/local/lib/python3.6/dist-packages/fairseq/search.py in step(self, step, lprobs, scores)
79 out=(self.scores_buf, self.indices_buf),
80 )
---> 81 torch.div(self.indices_buf, vocab_size, out=self.beams_buf)
82 self.indices_buf.fmod_(vocab_size)
83 return self.scores_buf, self.indices_buf, self.beams_buf
RuntimeError: Integer division of tensors using div or / is no longer supported, and in a future release div will perform true division as in Python 3. Use true_divide or floor_divide (// in Python) instead. |
Check #1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
downloaded all the models (mm-all was commented out in
scripts/download-and-setup-models.sh
).Ran the test translation script as mentioned in the Readme.
The text was updated successfully, but these errors were encountered: