Open vaibhavravi opened 7 years ago
I am having the exact same error!! Did u resolve it?
have you guys manage to find the solution ?
I tried initialize_all_variables
and graph root
but no success so far ? Do you think it is to do with TF 1.4 breaking compatibly with previous vs?
Hey I was having this problem too. The problem is you're likely not importing the ckpt files.
Turns out that running the code straight will not give you an error if you haven't actually loaded the checkpoint file since the code will skip over the loading if it doesn't find the files.
def restore_last_session(self):
saver = tf.train.Saver()
# create a session
sess = tf.Session()
# get checkpoint state
ckpt = tf.train.get_checkpoint_state(self.ckpt_path)
# restore session
if ckpt and ckpt.model_checkpoint_path: [<<<<<<<<<<<<<]
saver.restore(sess, ckpt.model_checkpoint_path)
# return to user
return sess
To fix it this issue, you need to do either one of the following after pulling and decompressing the model.
1) make sure to either have all the ckpt files directly in the ckpt folder 2) modify the ckpt_path (line 29 in chatbot.py) to be
`ckpt = 'ckpt/seq2seq_twitter_1024x3h_i43000'`
*assuming that your uncompressed folder is named the same as mine. If not then change seq2seq_twitter_1024x3h_i43000 to whatever you've named it.
That solved my problem and will likely fix yours.
Hey nunezpaul, I did what you said but it still gives me some NotFoundError, I am running python 3.5.4 and tensorflow 1.0.0
Here is the error: NotFoundError (see above for traceback): Key decoder/embedding_rnn_seq2seq/embedding_rnn_decoder/rnn_decoder/multi_rnn_cell/cell_1/basic_lstm_cell/biases/Adam_1 not found in checkpoint [[Node: save/RestoreV2_13 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/cpu:0"](_recv_save/Const_0, save/RestoreV2_13/tensor_names, save/RestoreV2_13/shape_and_slices)]]
^^^^
I am getting the error shown below after I run the model.predict() line in the twitter chatbot ipynb.
After some searching online I found that this happens when the variables are not initialized, but I am just trying to run your pre-trained model to see how it works.
Is there something I should be doing that's different ? Should I train before I run?