ValueError:使用无效的保存路径调用了还原

时间:2018-07-20 14:06:32

标签: tensorflow

尝试运行guess.py文件。

您可以找到指向github存储库here的链接。

要检测年龄和性别,我们运行了代码guess.py,但是在执行过程中出现了以下错误:

File "**guess.py**", line 181, in 
tf.app.run()
File "/usr/local/lib/python2.7/dist- 
packages/tensorflow/python/platform/app.py", line 30, in run
sys.exit(main(sys.argv[:1] + flags_passthrough))
File "guess.py", line 141, in main
saver.restore(sess, model_checkpoint_path)
File "/usr/local/lib/python2.7/dist- 
packages/tensorflow/python/training/saver.py", line 1342, in restore
"File path is: %r" % (save_path, file_path))
ValueError: Restore called with invalid save path: 
u'/21936/checkpoint-14999'. File path is: u'/21936/checkpoint-14999'

我们尝试通过更改:

tf.global_variables_initializer()

sess.run(tf.initialize_all_variables())

但没有解决。请提出前进的方向。

仅供参考:

tensorflow version: 0.11.0rc0
Ubuntu 16.04
python 2.7
cuda : 7.5

谢谢 兔子

0 个答案:

没有答案