Writes a TensorFlow graph summary.
Write an instance of
tf.compat.v1.GraphDef as summary only
in an eager mode. Please prefer to use the trace APIs (
tf.summary.trace_export) when using
tf.function which can automatically collect and record graphs from
writer = tf.summary.create_file_writer("/tmp/mylogs")
x = constant_op.constant(2)
y = constant_op.constant(3)
# Another example: in a very rare use case, when you are dealing with a TF v1
graph = tf.Graph()
c = tf.constant(30.0)
True on success, or False if no summary was written because no default
summary writer was available.
graph summary API is invoked in a graph mode.