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

vocab_prefix must be provided #14

Open
I3orn2FLY opened this issue Mar 28, 2019 · 3 comments
Open

vocab_prefix must be provided #14

I3orn2FLY opened this issue Mar 28, 2019 · 3 comments

Comments

@I3orn2FLY
Copy link

I run inference model like that:
python3.7 -m nmt --out_dir=../BestModel/sign2text/ -- inference_input_file=../Data/phoenix2014T.test.sign --inference_output_file=../Data/predictions.de --inference_ref_file=../Data/phoenix2014T.test.de --base_gpu=0

Then i have following error:
nslt/nslt/nmt.py", line 244, in extend_hparams raise ValueError("hparams.vocab_prefix must be provided.") ValueError: hparams.vocab_prefix must be provided.

In arguments i found this line:
parser.add_argument("--vocab_prefix", type=str, default=None, help="""\ Vocab prefix, expect files with src/tgt suffixes.If None, extract from train files.\ """)

Where do i find this vocab_prefix or folder or whatever?

@kyumiouchi
Copy link

try this configuration => #13 (comment)
anaconda2, python 2.7, tensorflow-gpu 1.4.0rc1,...

@boyuzz
Copy link

boyuzz commented May 3, 2019

I meet the same problem. The comment in #13 is the command for training, not inference.

@EricWangyz
Copy link

Under nslt/nslt/ folder, I ran the command below and it worked for me.
python -m nmt --out_dir=<trained_model_dir> --inference_input_file=../Data/phoenix2014T.test.sign --inference_output_file=../Data/predictions_test.de --vocab_prefix=../Data/phoenix2014T.vocab --inference_ref_file=../Data/phoenix2014T.test.de --base_gpu=0

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

4 participants