title: When do I have to initialize variables in Tensorflow?
body: <p>I am trying to understand tensor flow and how  understand it one has to first create ops and variables add them to the graph and then in a session those operations will be performed.
  Then why in this piece of code I don't have to use the method initialize_all_variables()?
  I was trying to add <code>init = tf.initialize_all_variables()</code> and then <code>sess.run(init)</code> but it was wrong. Why is this working without the initialization??</p>
  
  <pre><code>import tensorflow as tf 
  import numpy as np
  x = tf.placeholder('float', [2,3])
  y = x*2
  z = tf.Variable([[1,1,1],[1,1,1]], name = "z")
  with tf.Session() as sess:
      x_data = np.arange(1,7).reshape((2,3))
      z.assign(x_data)
      res = sess.run(y, feed_dict = {x:x_data})
      print(res.dtype, z.dtype, z.get_shape())`
  </code></pre>