Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # usage: python restore_checkpoint.py model.ckpt-1000
- import sys
- import tensorflow as tf
- ckpt = sys.argv[1]
- # soft placement in case using a different system setup
- config = tf.ConfigProto(allow_soft_placement=True)
- with tf.Session(config=config) as sess:
- new_saver = tf.train.import_meta_graph(ckpt + '.meta')
- new_saver.restore(sess, ckpt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement