tensorflow / nmt

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

Table trying to initialize from file is already initialized #234

Open nbro opened 6 years ago

nbro commented 6 years ago

I keep having the following line printed out on the terminal

2018-01-08 16:50:01.982208: W tensorflow/core/kernels/lookup_util.cc:362] 
Table trying to initialize from file iwslt15/vocab.en is already initialized.

while training a modified version of the basic NMT model. Do you have any idea why this is happening?

It doesn't look like that message/warning above is printed out after a particular message. Sometimes it is printed out after the "src", "ref" and "nmt" sentences are printed out, sometimes it is printed out after the message "# Save eval, global step", sometimes after the message "eval test".

The training process seems to proceed unaffectedly.

I saw other posts with the same warning/message, but I'd like to understand why it is being printed out.

sleighsoft commented 6 years ago

I think nmt uses multiple graphs. One for train, eval and infer. Everytime they switch to a different graph they run the initializers. My assumption is that tables like the reverse lookup table used by infer/eval or the lookup table of train are shared across these but the tf.tables_initializer() tries to reinitialize them. This is why this is probably only a warning.

reedwm commented 6 years ago

/CC @lmthang @ebrevdo