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

How to use trained model form checkpoints? #23

Open
proevgenii opened this issue Apr 30, 2022 · 0 comments
Open

How to use trained model form checkpoints? #23

proevgenii opened this issue Apr 30, 2022 · 0 comments

Comments

@proevgenii
Copy link

How can I make predictions with your model from checkpoints/USPTO50K_typed_checkpoint.pt ?
I've made all the steps before bash train.sh
P.S
I try to use them with script translate.sh from /OpenNMT-py/script/USPTO50K-aug-typed/translate.sh
By changing the path to weights, but it gives me an error:
Traceback (most recent call last): File "../../onmt/bin/translate.py", line 52, in <module> main() File "../../onmt/bin/translate.py", line 48, in main translate(opt) File "../../onmt/bin/translate.py", line 18, in translate translator = build_translator(opt, report_score=True) File "/raid/eprosvirin/anaconda3/envs/retroxpert/lib/python3.6/site-packages/onmt/translate/translator.py", line 28, in build_translator fields, model, model_opt = load_test_model(opt) File "/raid/eprosvirin/anaconda3/envs/retroxpert/lib/python3.6/site-packages/onmt/model_builder.py", line 97, in load_test_model model_opt = ArgumentParser.ckpt_model_opts(checkpoint['opt']) KeyError: 'opt'

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

1 participant