Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var_list = tf.contrib.framework.get_variables_to_restore(exclude=new_variables_name)
- saver = tf.train.Saver(var_list)
- with tf.train.MonitoredTrainingSession(checkpoint_dir=FLAGS.train_dir,
- hooks=[tf.train.StopAtStepHook(last_step=FLAGS.max_steps),
- tf.train.NanTensorHook(loss)],
- config=tf.ConfigProto(
- log_device_placement=FLAGS.log_device_placement)) as mon_sess:
- saver.restore(mon_sess, ".../model.ckpt-100000")
- while not mon_sess.should_stop():
- mon_sess.run(train_op)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement