Skip to content

Instantly share code, notes, and snippets.

@InnerPeace-Wu
Last active October 4, 2017 03:27
Show Gist options
  • Save InnerPeace-Wu/3160c60bdbb89af4d13950a44993d93b to your computer and use it in GitHub Desktop.
Save InnerPeace-Wu/3160c60bdbb89af4d13950a44993d93b to your computer and use it in GitHub Desktop.
Ways to add graph to tensorboard.
import tensorflow as tf
# 1
# add it in one line, NOTE: we need lanch a session before.
writer = tf.summary.FileWriter('path/to/file/name', sess.graph)
# 2
writer = tf.summary.FileWriter('path/to/file/name')
#somewhere after lanching the session to add graph. NOTE: add it later.
writer.add_graph(sess.graph)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment