Why can't MonitoredTrainingSession receive a graph as an argument?

Why is tf.train.MonitoredTrainingSession

n't it getting the graph as an argument?

tf.Session

(and tf.train.Supervisor

) can do the following:

with tf.Graph().as_default() as g:
    # Build computation graph...

with tf.Session(graph=g) as sess:
    # Run operations...

      

Only the recording method is recommended, as shown below:

with tf.Graph().as_default() as g:
    # Build computation graph...

    with tf.train.MonitoredTrainingSession(...) as mon_sess:
        # Run operations...

      

+3


source to share





All Articles