Conchylicultor / DeepQA

My tensorflow implementation of "A neural conversational model", a Deep learning based chatbot
Apache License 2.0
2.93k stars 1.17k forks source link

"NotFoundError" when test pre-trained model #120

Open Zminghua opened 7 years ago

Zminghua commented 7 years ago

hello, I have downloaded pre-trained model, when i follow the instructions in README.md to test the pre-trained model then I got the error info.

NotFoundError (see above for traceback): Tensor name "embedding_rnn_seq2seq/rnn/embedding_wrapper/multi_rnn_cell/cell_1/basic_lstm_cell/weights" not found in checkpoint files /home/zmh/github/DeepQA/save/model-pretrainedv2/model.ckpt

my python is 3.4.2 and my tensorflow is 1.1, this is run in Debian 3.2.78 with x64。

Conchylicultor commented 7 years ago

The pre-trained model has been trained with a older​ version of tensorflow so it is possible that there is some compatibility issues with TF 1.1

jinjiaji512 commented 7 years ago

I also got a similar error.

NotFoundError (see above for traceback): Tensor name "embedding_rnn_seq2seq/embedding_rnn_decoder/rnn_decoder/output_projection_wrapper/multi_rnn_cell/cell_1/basic_lstm_cell/bias" not found in checkpoint files /Users/jingyongxia/git/DeepQA/save/model-pretrainedv2/model.ckpt

my python is 3.6.1 and my tensorflow is 1.2.1, this is run in MacOs 10.12.5 with x64。

svakulenk0 commented 7 years ago

confirm. works with pip install tensorflow==1.0.0

EMCP commented 7 years ago

According to TF 1.2 release notes

tensorflow/contrib/rnn undergoes RNN cell variable renaming for consistency with Keras layers. Specifically, the previous variable names "weights" and "biases" are changed to "kernel" and "bias", respectively. This may cause backward incompatibility with regard to your old checkpoints containing such RNN cells, in which case you can use the checkpoint_convert script

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/rnn/python/tools/checkpoint_convert.py

Update : I ran this script.. passed the V1 flag to indicate these checkpoint files are the version 1 type... (I assumed this based on the files in the zip) .. still get an error.

https://stackoverflow.com/questions/45633165/tried-out-the-convert-checkpoint-py-unsure-if-it-worked

stiger104 commented 7 years ago

Pleas use TF 1.0.0, it works!

wiwengweng commented 6 years ago

if you want to use TF1.2 or 1.3, please check Nicolas C.'s work here. https://mcastedu-my.sharepoint.com/personal/nicholas_cutajar_a100636_mcast_edu_mt/_layouts/15/guestaccess.aspx?folderid=077576c4cf9854642a968f67909380f45&authkey=AVt2JWMPkf2R_mWBpI1eAUY

snorlaxse commented 5 years ago

如果你想使用TF1.2或1.3,请在这里查看Nicolas C.的工作。 https://mcastedu-my.sharepoint.com/personal/nicholas_cutajar_a100636_mcast_edu_mt/_layouts/15/guestaccess.aspx?folderid=077576c4cf9854642a968f67909380f45&authkey=AVt2JWMPkf2R_mWBpI1eAUY

sorry, this link is nothing. I want to know its context. What can I do ?