import tensorflow as tf

            tf.summary.scalar('Training Loss', m.cost)
            tf.summary.scalar('Learning rate', m.lr)

    latest_ckpt = tf.train.latest_checkpoint(FLAGS.save_path)

    with train_graph.as_default():
        sv = tf.train.Supervisor(logdir=FLAGS.save_path)
        config_proto = tf.ConfigProto(log_device_placement=False,
                                      allow_soft_placement=True)
        with sv.managed_session(config=config_proto) as train_sess:
        #with tf.Session(config=config_proto) as train_sess:
            train_sess.run(tf.global_variables_initializer())
