Nmt: [error] HashTable has different value for same key

Created on 4 Jan 2018  路  4Comments  路  Source: tensorflow/nmt

I'm trying to execute the first example:

mkdir /tmp/nmt_model
python -m nmt.nmt \
--src=vi --tgt=en \
--vocab_prefix=/tmp/nmt_data/vocab \
--train_prefix=/tmp/nmt_data/train \
--dev_prefix=/tmp/nmt_data/tst2012 \
--test_prefix=/tmp/nmt_data/tst2013 \
--out_dir=/tmp/nmt_model \
--num_train_steps=12000 \
--steps_per_stats=100 \
--num_layers=2 \
--num_units=128 \
--dropout=0.2 \
--metrics=bleu

And it's returning the following error:

FailedPreconditionError (see above for traceback): HashTable has different value for same key. Key has 0 and trying to add value 86

image

How can I solve this?

Most helpful comment

I encountered the same error, I solved it by text edior, found and deleted the duplicated word. It works.

All 4 comments

Hi @denisb411

Did you follow the instruction to download /tmp/nmt_data/...? Looks like there are duplicated values in your vocab file.

I encountered the same error, I solved it by text edior, found and deleted the duplicated word. It works.

Thanks, I will look around on this issue of duplicated words.

Seems like this has been resolved. Close for now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drwael picture drwael  路  6Comments

yapingzhao picture yapingzhao  路  3Comments

zhangpengGenedock picture zhangpengGenedock  路  4Comments

thomasschmied picture thomasschmied  路  5Comments

JBH168 picture JBH168  路  6Comments