Skip to content
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

Getting error when running on pre-trained model #32

Open
chintanshrinath opened this issue Jun 22, 2021 · 1 comment
Open

Getting error when running on pre-trained model #32

chintanshrinath opened this issue Jun 22, 2021 · 1 comment

Comments

@chintanshrinath
Copy link

chintanshrinath commented Jun 22, 2021

Hi

Good work!!!
When I run "run_test_transformer.sh" using pre-trained model, which I have download from Google Drive, while running this one, getting error like that

File "translate.py", line 37, in
main(opt)
File "translate.py", line 19, in main
translator = build_translator(opt, report_score=True)
File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/translate/translator.py", line 38, in build_translator
onmt.model_builder.load_test_model(opt, dummy_opt.dict)
File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/model_builder.py", line 142, in load_test_model
model = build_base_model(model_opt, fields, use_gpu(opt), checkpoint)
File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/model_builder.py", line 166, in build_base_model
src_embeddings = build_embeddings(model_opt, src_dict, feature_dicts)
File "/content/drive/My Drive/summarization/SUMMPIP/Multi_news/Multi-News/code/OpenNMT-py-baselines/onmt/model_builder.py", line 44, in build_embeddings
num_word_embeddings = len(word_dict)
File "/usr/local/lib/python3.7/dist-packages/torchtext/vocab.py", line 62, in len
return len(self.vocab)
File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1131, in getattr
type(self).name, name))
AttributeError: 'Vocab' object has no attribute 'vocab'

Can you help me to resolve this?

Thanks

@corrine1106
Copy link

I get the same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants