title: How do I "reset" the graph displayed in TensorBoard for a TensroFlow InteractiveSession?
body: <p>I'd like to be able to view a TensorFlow graph that I'm experimenting with in a TensorBoard <code>InteractiveSession</code>. </p>
  
  <p>For example I'd like to be ale to enter an operation <code>A</code> and then refresh TensorBoard and see <code>A</code> in the graph, then execute <code>B</code> and refresh and see <code>B</code> in the graph. Then if I decide I want to change the graph, I'd like to preform some operation and get a clean slate, so that when I subsequently enter <code>A</code> and <code>C</code>, I just see <code>A</code> and <code>C</code> in TensorBoard, and not <code>B</code>, <code>C</code> and two versions of <code>A</code>, as I currently see.</p>
  
  <p>For example if I</p>
  
  <pre><code>import tensorflow as tf
  sess = tf.InteractiveSession()
  # operation A
  # operation B
  writer = tf.summary.FileWriter(logdir='logdir', graph=sess.graph)
  writer.flush()
  </code></pre>
  
  <p>and then run</p>
  
  <pre><code>tensorboard --logdir logdir --purge_orphaned_data
  </code></pre>
  
  <p>I get a graph in TensorBoard showing <code>A</code> an <code>B</code> as expected.</p>
  
  <p>If I later perform additional operations</p>
  
  <pre><code># operation P
  # operation Q
  </code></pre>
  
  <p>these do not appear in TensorBoard, unless I again execute:</p>
  
  <pre><code>writer = tf.summary.FileWriter(logdir='_tflog', graph=sess.graph)
  writer.flush()
  </code></pre>
  
  <p>which creates a <em>new log</em> and <code>P</code> and <code>Q</code> now appear in the graph alongside <code>A</code> and <code>B</code> in TensorBoard.</p>
  
  <p>Each additional execution of any of these operations either has no effect in TensorBoard, or appears as an additional node if I run the <code>writer</code> lines above.</p>
  
  <p>If I want to subsequently remove operations (say <code>A</code> and <code>P</code>), I seem to need to completely restart everything (the <code>Session</code> and the <code>FileWriter</code> and delete all the old logs).</p>
  
  <p>All this is confusing and hard to keep track of (I'm not even certain my account above is accurate!).</p>
  
  <p>Is there some way to completely reset the <code>Graph</code> that TensorBoard uses so that I can view in TensorBoard only those graph elements added since the last such reset?</p>