tensorflow / nmt

TensorFlow Neural Machine Translation Tutorial
Apache License 2.0
6.37k stars 1.96k forks source link

How to use a trained model for translation? #324

Open yapingzhao opened 6 years ago

yapingzhao commented 6 years ago

Hi, I use the following command to generate translations. python -m nmt.nmt \ --out_dir=/tmp/nmt_model \ --inference_input_file=/tmp/my_infer_file.vi \ --inference_output_file=/tmp/nmt_model/output_infer However, the output error message: raise ValueError("hparams.vocab_prefix must be provided.") ValueError: hparams.vocab_prefix must be provided. I am newbie of nmt.I don't know how to use the trained model for translation. Looking forward to your advice or answers. Best regards,

yapingzhao

MingLunHan commented 6 years ago

maybe you can try to add vocab.prefix in your command, like this --vocab_prefix=/tmp/nmt_data/vocab ......just an advice