title: Variable initialization error in Tensorflow
body: <p>I am following a TensorFlow tutorial and running the below code but running into Variable initialization error:</p>
  
  <pre><code>num_points = 1000
  vectors_set = []
  for i in range(num_points):
           x1= np.random.normal(0.0, 0.55)
           y1= x1 * 0.1 + 0.3 + np.random.normal(0.0, 0.03)
           vectors_set.append([x1, y1])
  
  x_data = [v[0] for v in vectors_set]
  y_data = [v[1] for v in vectors_set]
  W = tf.Variable(tf.random_uniform([1], -1.0, 1.0))
  b = tf.Variable(tf.zeros([1]))
  y = W * x_data + b
  loss = tf.reduce_mean(tf.square(y - y_data))
  optimizer = tf.train.GradientDescentOptimizer(0.5)
  train = optimizer.minimize(loss)
  init = tf.initialize_all_variables()
  sess = tf.Session()
  sess.run(init)
  </code></pre>
  
  <p>And the error message generated is:</p>
  
  <pre><code>FailedPreconditionError: Attempting to use uninitialized value Variable_3
       [[Node: Variable_3/read = Identity[T=DT_INT64, _class=["loc:@Variable_3"], _device="/job:localhost/replica:0/task:0/cpu:0"](Variable_3)]]
  Caused by op 'Variable_3/read', defined at:
    File "/Users/ayada/anaconda/envs/tensorflow/lib/python3.5/runpy.py", line 184, in _run_module_as_main
      "__main__", mod_spec)
    File "/Users/ayada/anaconda/envs/tensorflow/lib/python3.5/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/Users/ayada/anaconda/envs/tensorflow/lib/python3.5/site-packages/ipykernel/__main__.py", line 3, in &lt;module&gt;
      app.launch_new_instance()
    File "/Users/ayada/anaconda/envs/tensorflow/lib/python3.5/site-packages/traitlets/config/application.py", line 653, in launch_instance
      app.start()
    File "/Users/ayada/anaconda/envs/tensorflow/lib/python3.5/site-packages/ipykernel/kernelapp.py", line 474, in start
      ioloop.IOLoop.instance().start()
    File "/Users/ayada/anaconda/envs/tensorflow/lib/python3.5/site-packages/zmq/eventloop/ioloop.py", line 162, in start
      super(ZMQIOLoop, self).start()
  </code></pre>
  
  <p>Can someone advise me how to rectify this?</p>