错误为:Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error:
网上找了许久,大部分原因说是模型不一样。但我的模型是直接复制的,所以不是这个问题。
最后找到解决方案
原来的sever定义:
saver = tf.train.Saver()
更改为:
saver=tf.train.import_meta_graph('./model_CNN/CNN_net.ckpt.meta')
问题解决