tensorflow / nmt

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

How can i use my custom word embedding in specific scale rather equal to the num_units? #381

Open dosonleung opened 5 years ago

dosonleung commented 5 years ago

As you know, i want to use my word embedding in 300 dimension but not the same as num_units.

yapingzhao commented 5 years ago

Hi, I also want to use the --embed_prefix option to use my own trained word vector (word2vec). But,An error occurred while I was running the command python -m nmt.nmt --src=vi --tgt=en --num_units=300 --embed_prefix=nmt/nmt_data/vector error:"All embedding size should be size." If you have any suggestions, please give me some suggestions, thank you very much!

dosonleung commented 5 years ago

I never met that problem before but i guess something wrong with your word vector file.The embedding files should be Glove formated txt files.May be you should check your embedding files or download from Google Glove,Facebook etc.

yapingzhao commented 5 years ago

thank you!

anaskoara commented 5 years ago

how to build my custom embedding to train it separately and how to use this embeddings