title: When to use writer.flush() in Tensorboard
body: <p>In this minimal example, Tensorboard doesn't display my summaries during execution unless I use <code>writer.flush()</code>:</p>
  
  <pre><code>from time import sleep
  import tensorflow as tf
  import numpy as np
  
  
  x = tf.placeholder("float", [None, 2])
  
  mean = tf.reduce_mean(x)
  tf.scalar_summary("mean", mean)
  
  init = tf.initialize_all_variables()
  
  merged = tf.merge_all_summaries()
  
  with tf.Session() as sess:
      sess.run(init)
  
      summary_writer = tf.train.SummaryWriter('/var/tmp/tf_log', graph=sess.graph)
  
      x_iter = np.random.rand(2,2)
      for ind in range(30):
          merged_summary = sess.run(merged, feed_dict={x: x_iter})
          summary_writer.add_summary(merged_summary, ind)
          summary_writer.flush()
  
          x_iter += 1.0
          sleep(1)
  </code></pre>
  
  <p>When the run is finished the scalar is displayed just fine.<br>
  The <code>mnist_with_summaries</code> example displays summaries during execution just fine.<br>
  When do I need to use <code>flush()</code>? Is this due to buffers not filling?</p>