DeepQA icon indicating copy to clipboard operation
DeepQA copied to clipboard

"NotFoundError" when test pre-trained model

Open Zminghua opened this issue 7 years ago • 7 comments

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。

Zminghua avatar Jun 02 '17 08:06 Zminghua

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

Conchylicultor avatar Jun 04 '17 15:06 Conchylicultor

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。

jinjiaji512 avatar Jul 17 '17 10:07 jinjiaji512

confirm. works with pip install tensorflow==1.0.0

svakulenk0 avatar Aug 04 '17 15:08 svakulenk0

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

EMCP avatar Aug 10 '17 22:08 EMCP

Pleas use TF 1.0.0, it works!

stiger104 avatar Sep 18 '17 12:09 stiger104

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

wiwengweng avatar Jan 16 '18 01:01 wiwengweng

如果你想使用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 ?

snorlaxse avatar Dec 13 '18 09:12 snorlaxse