为什么MonitoredTrainingSession无法接收图形作为参数?

时间:2017-05-21 13:01:22

标签: python tensorflow

为什么tf.train.MonitoredTrainingSession没有接收图形作为参数?

tf.Session(以及tf.train.Supervisor)可以执行以下操作:

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

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

建议只采用如下的写作方式?

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

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

0 个答案:

没有答案