no model.ckpt, 3 model.ckpt.* files instead
phobrain opened this issue · 3 comments
Thanks for the code! A couple of small fixes:
I bet this is due to a tf version change: tf: 1.3.0
Rather than a model.ckpt file, I see
-rw-r--r-- 1 priot staff 7421960 Aug 19 13:53 model.ckpt.data-00000-of-00001
-rw-r--r-- 1 priot staff 283 Aug 19 13:53 model.ckpt.index
-rw-r--r-- 1 priot staff 59654 Aug 19 13:53 model.ckpt.meta
So this code fails:
model_ckpt = 'model.ckpt'
if os.path.isfile(model_ckpt):
Fix: model_ckpt = 'model.ckpt.meta'
Next problem:
File "run.py", line 70, in
visualize.visualize(embed, x_test)
NameError: name 'embed' is not defined
Fix: insert the 2 'embed' lines at the end of run.py:
visualize result
embed = np.fromfile('embed.txt', dtype=np.float32)
embed = embed.reshape([-1, 2])
x_test = mnist.test.images.reshape([-1, 28, 28])
visualize.visualize(embed, x_test)
Hi, I have the same problem. But there is still one thing I can't fix and I wonder whether you had met the same.
In fact, I can't load the previously train model, It always says there's no matching for model.ckpt, even if I changed the filename.
If you met this problem before, could you please tell me how to fix this? Thank you.
Hi, I checked with the current Tensorflow 1.5, and modified codes a little bit. It seems working fine:
It seemed tf.saver.restore
and tf.saver.save
require including a folder, so I included current path, e.g., saver.restore(sess, './model')
instead of saver.restore(sess, 'model')
. I just git-pushed it. Please check and let me know!
The modified codes works well. Thanks for the updates!