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'
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