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

translate.py #59

Closed
YawWQ opened this issue Jul 1, 2020 · 2 comments
Closed

translate.py #59

YawWQ opened this issue Jul 1, 2020 · 2 comments

Comments

@YawWQ
Copy link

YawWQ commented Jul 1, 2020

hi, I wanted to try the baselines model, however, I could not find the 'translate.py' to run the model. Could you plz tell me where I can find it? Thank you so much.

Using the trained model
For the NMT baselines (BiLSTM, Transformer) we used the implementation of OpenNMT-py. The trained BiLSTM model is available here: https://code2seq.s3.amazonaws.com/lstm_baseline/model_acc_62.88_ppl_12.03_e16.pt
...

The command line for "translating" a "source" file to a "target" is: python3 translate.py -model model_acc_62.88_ppl_12.03_e16.pt -src test_source.txt -output translation_epoch16.txt -gpu 0

...

@urialon
Copy link
Contributor

urialon commented Jul 1, 2020

Hi @YawWQ ,
Thank you for your interest in code2seq!

The translate.py script is part of OpenNMT-py. See OpenNMT-py and run their translate.py script with our model and our test_source.txt file.

Best,
Uri

@urialon
Copy link
Contributor

urialon commented Jul 6, 2020

Closing due to inactivity, feel free to re-open if you have further questions.
Uri

@urialon urialon closed this as completed Jul 6, 2020
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