Python 如何读取旧版本的tensorflow检查点?

Python 如何读取旧版本的tensorflow检查点?,python,tensorflow,Python,Tensorflow,我使用了tensorflow==0.11.0来保存我的模型。这使用旧格式。我的档案是: checkpoint_old/ checkpoint DCGAN.model-9002 DCGAN.model-9002.meta 如何使用tensorflow==1.0.0读取模型?检查点的格式已更改。这似乎不起作用: from tensorflow.core.protobuf import saver_pb2 saver = tf.train.Saver(write_versi

我使用了
tensorflow==0.11.0
来保存我的模型。这使用旧格式。我的档案是:

checkpoint_old/
    checkpoint
    DCGAN.model-9002
    DCGAN.model-9002.meta
如何使用
tensorflow==1.0.0
读取模型?检查点的格式已更改。这似乎不起作用:

from tensorflow.core.protobuf import saver_pb2

saver = tf.train.Saver(write_version = saver_pb2.SaverDef.V1)
ckpt = tf.train.get_checkpoint_state('checkpoint_old')
if ckpt and ckpt.model_checkpoint_path:
    print ckpt.model_checkpoint_path #checkpoint_old/DCGAN.model-9002
    saver.restore(sess, ckpt.model_checkpoint_path)

canonball有进展吗?