title: A simple case of Graph visualization in TensorFlow 2.0
body: <p>I would like to simply define a model and visualize its graph in TensorBoard for initial architectural examination. Thus, I would not like to compute anything for this purpose.</p>
  
  <p>In TensorFlow 1.X, it was simple to achieve inside a <code>tf.Session()</code> where I could simply <code>flush()</code> a summary file writer.</p>
  
  <p>In TensorFlow 2.0, there is no <code>tf.Session()</code> and hence the question is how do I achieve it ?</p>
  
  <p>The following is an example code. What additions do I need to make, in order for it to write the graph structure in TensorBoard ?</p>
  
  <pre><code>from nets import i3d
  import tensorflow as tf
  
  def i3d_output(model, x):
      out, _ = model(x)
      return out
  
  tf.compat.v1.disable_eager_execution()
  x = tf.random.uniform(shape=(4,179,224,224,3))
  model = i3d.InceptionI3d()
  net = i3d_output(model, x)
  train_summary_writer = tf.summary.create_file_writer('/home/uujjwal/bmvc2019')
  </code></pre>