practical_seq2seq
practical_seq2seq copied to clipboard
Your checkpoints doesn't work
!!
I am facing the same issues
Hey I was having this problem too.
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.
make sure to either have all the ckpt files directly in the ckpt folder
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.
@nunezpaul Thank you so much for your response, can i know which tensorflow version you are on? It still does not work for me.
I'm using tensorflow 0.12.1. Even though it was written for 0.12.0, it still should work.
I did the change as you mentioned, put all uncompressed files in the folder 'ckpt/seq2seq_twitter_1024x3h_i43000/' which contains checkpoint,meta,ckpt and index files. Error: Assign requires shapes of both tensors to match. lhs shape= [6002,1024] rhs shape= [8002,1024] This is the error i get on the restore , can you help me.
Definitely not an error I got. Sounds like you played around some of the settings and left the changes? The model should work if you haven't touched anything else.
As a test, you should be able to import chatbot.py and get a valid response from chatbot.respond('say something')
Hi, I am facing same problem with no matching shapes, have you found a solution for that ?