title: Tensorflow Graphs : Are Tensorflow graphs DAG? What happens in assignAdd operations in tensor Variables
body: <p>How is this graph acyclic? assign add op adds x to itself.</p>
  
  <pre><code>import tensorflow as tf
  sess = tf.Session()
  x = tf.Variable(1300,name="x")
  y = tf.Variable(200, name="y")
  z = tf.add(x, y,name="z")
  b = x.assign_add(z)
  init = tf.initialize_all_variables()
  writer = tf.train.SummaryWriter("/tmp/logdir", sess.graph)
  sess.run(init)
  print(sess.run(b))
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QPmIw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QPmIw.png" alt="TensorBoard Graph for the computation"></a></p>
  
  <p>Clearly there is a bi-directional edge between AssignAdd and X.</p>
  
  <p>Why is X depicted twice as a variable?</p>