如保存操作为saver.save(sess, “train_model”)
那么会产生四个文件,这是python3的saver.restore()格式,分别为:
1.checkpoint
2.train_model-100.index
3.train_model-100.meta
4.train_model-100.data-00000-of-00001
那么导入时,saver.restore(sess,“train_model-100”)
不是“train_model-100.data-00000-of-00001”,也不是“train_model”!
python2的saver.save格式会生成三个文件:
1.checkpoint
2.train_model-100.meta
3.train_model-100.ckpt-00000-of-00001
aver.restore(sess,train_model-100.ckpt-00000-of-00001)
参考链接:https://blog.csdn.net/weixin_43632109/article/details/88685211