Create FileWriter <-> tf.contrib.summary compatibility layer
This provides an implementation of FileWriter, activated by passing in a `session` parameter to the constructor, that is backed by session.run'ing graph ops that manipulate a tf.contrib.summary.create_file_writer() instance. Because tf.contrib.summary.SummaryWriters are backed by shared resources in the graph, this makes it possible to have a FileWriter and a tf.contrib.summary.SummaryWriter that both write to the same events file. This change includes some related smaller changes: - Factors out training_utils.py into a separate target to avoid a cyclic dep - Moves contrib/summary/summary_ops.py to python/ops/summary_ops_v2.py - Adds SummaryWriter.init(), .flush(), and .close() op-returning methods - Changes create_file_writer() `name` arg to default to logdir prefixed by `logdir:` so shared resources are scoped by logdir by default - Fixes a bug with tf.contrib.summary.flush() `writer` arg - Makes create_file_writer()'s max_queue arg behave as documented - Adds more testing for existing tf.contrib.summary API PiperOrigin-RevId: 192408079
Loading
Please sign in to comment