You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
I ran a standard attention / scaled_luong / uni system and go the expected results.
Same with gnmt architecture / scaled_luong / enc_type gnmt, completely off.
Is there something special to do for GNMT attention architecture ?
Same problem here. After training, when doing inference I get:
KeyError: 'num_encoder_residual_layers'
It only works when I delete all these keys from the hparams file, and when I set the --hparams_path to the directory of the best_bleu, but then after one run, for some reason, it rewrites the hparams file, and add these problematic key/values again... It's not clear how this mechanism works.
My guess is that when the code is saving hparams, it simply writes key values that it doesn't suppose to.
@bquast I think this is related to #264 and there is a PR fixed this #265. Maybe you can try patch the PR and see if you still get the issue. Make sure you clear the model directory.
Activity
oahziur commentedon Jul 13, 2017
Thanks, I will need to update the
nmt/standard_hparams/wmt16_en_de_gnmt.json.oahziur commentedon Jul 13, 2017
I am also adding instructions on how to train and load the gnmt model from scratch.
vince62s commentedon Jul 21, 2017
I ran a standard attention / scaled_luong / uni system and go the expected results.
Same with gnmt architecture / scaled_luong / enc_type gnmt, completely off.
Is there something special to do for GNMT attention architecture ?
oahziur commentedon Jul 21, 2017
@vince62s Did you check with the standard_hparams for GNMT, there are also pre-trained models available for download in the README page.
ndvbd commentedon Jan 2, 2018
Same problem here. After training, when doing inference I get:
KeyError: 'num_encoder_residual_layers'It only works when I delete all these keys from the hparams file, and when I set the --hparams_path to the directory of the best_bleu, but then after one run, for some reason, it rewrites the hparams file, and add these problematic key/values again... It's not clear how this mechanism works.
My guess is that when the code is saving hparams, it simply writes key values that it doesn't suppose to.
oahziur commentedon Jan 2, 2018
@nadavb can you share the command getting the error? were you using the standard_hparams file in the repo for inference?
There are some updates to the hparams recently, so I think the standard_hparams maybe out of date.
ndvbd commentedon Jan 4, 2018
@oahziur I did not use the standard hparams. I used the params as shown in the tutorial.
So for training:
And for inference:
LimWoohyun commentedon Jan 9, 2018
@nadavb Hello. i"m studying nmt.
i want to run test file. so i ran just. nmt,py but failed.
how to command your script?? please let me know basiclly
ndvbd commentedon Jan 10, 2018
@LimWoohyun Look at https://github.com/tensorflow/nmt -> search for "Hands-on – building an attention-based NMT model" the command is written there.
bquast commentedon Feb 22, 2018
@oahziur I get Key error using the standard_hparams (tf 1.6rc1, will try on my other machine with tf1.5-cuda).
using the command:
full output here:
https://gist.github.com/bquast/30ba7630d2bf32b59dd8349889fc7638
EDIT: confirmed, same error on tf15.-cuda
https://gist.github.com/bquast/0ddbf8eda363d312dd57b51aebb11f5d
tiberiu92 commentedon Mar 8, 2018
@bquast I recently got the error using the same configuration.
I tried this with tf14 too, but no luck. Are there any updates on this?
Thank you.
bquast commentedon Mar 9, 2018
hey, no news yet, any progress on your side?
oahziur commentedon Mar 10, 2018
@bquast I think this is related to #264 and there is a PR fixed this #265. Maybe you can try patch the PR and see if you still get the issue. Make sure you clear the model directory.
xiaohaoliang commentedon Jul 3, 2018
@bquast @tiberiu92 @oahziur
I got the same error using the same configuration. (tf-1.8, python-2.7)
python -m nmt.nmt \ --src=de --tgt=en \ --ckpt=/home/xiaohao/nmt/models/deen_gnmt_model_4_layer/translate.ckpt \ --hparams_path=nmt/standard_hparams/wmt16_gnmt_4_layer.json \ --out_dir=/home/xiaohao/data/deen_gnmt \ --vocab_prefix=/home/xiaohao/data/wmt16/vocab.bpe.32000 \ --inference_input_file=/home/xiaohao/data/wmt16/newstest2015.tok.bpe.32000.de \ --inference_output_file=/home/xiaohao/data/deen_gnmt/output_infer \ --inference_ref_file=/home/xiaohao/data/wmt16/newstest2015.tok.bpe.32000.enI print keys of
deen_gnmt_model_4_layer/translate.ckpt,not find.../rnn/basic_lstm_cell/biasI try the PR(#265), and
rm -rf /home/xiaohao/data/deen_gnmt/*. The problem is sloved!tks~ @oahziur