Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save Tensorflow graph for viewing in Tensorboard without summary operations

I have a rather complicated Tensorflow graph that I'd like to visualize for optimization purposes. Is there a function that I can call that will simply save the graph for viewing in Tensorboard without needing to annotate variables?

I Tried this:

merged = tf.merge_all_summaries()
writer = tf.train.SummaryWriter("/Users/Name/Desktop/tf_logs", session.graph_def)

But no output was produced. This is using the 0.6 wheel.

This appears to be related: Graph visualisaton is not showing in tensorboard for seq2seq model

like image 488
jstaker7 Avatar asked Dec 23 '15 01:12

jstaker7


People also ask

How do you show a TensorBoard graph?

Select the Graphs dashboard by tapping “Graphs” at the top. You can also optionally use TensorBoard. dev to create a hosted, shareable experiment. By default, TensorBoard displays the op-level graph.

How graphs are stored and represented in TensorFlow?

TensorFlow uses graphs as the format for saved models when it exports them from Python. Graphs are also easily optimized, allowing the compiler to do transformations like: Statically infer the value of tensors by folding constant nodes in your computation ("constant folding").


1 Answers

For efficiency, the tf.train.SummaryWriter logs asynchronously to disk. To ensure that the graph appears in the log, you must call close() or flush() on the writer before the program exits.

like image 195
mrry Avatar answered Sep 27 '22 20:09

mrry