title: Tensorflow program results in type conversion error
body: <p>Tring to master Tensorflow, following documentation of TensorFlow.</p>
  
  <p><strong>Below program results in 'Incompatible type conversion error'</strong></p>
  
  <pre><code>import tensorflow as tf
  
  W = tf.Variable([.3], tf.float32)
  b = tf.Variable([-3], tf.float32)
  x = tf.placeholder(tf.float32)
  linear_model = 1.0
  linear_model = W * x + b
  #tf.to_float(linear_model, name='ToFloat')
  
  # Global initialization is must
  init = tf.global_variables_initializer()
  sess.run(init)
  
  print(sess.run(linear_model, {x:[1,2,3,4]}))
  </code></pre>
  
  <p><strong>Above program results in this error</strong></p>
  
  <blockquote>
    <p>File "v-prog3-variables.py", line 7, in 
        linear_model = W * x + b
    .. .. ..
    ValueError: Incompatible type conversion requested to type 'float32'
    for variable of type 'int32_ref'</p>
  </blockquote>
  
  <p><strong>I tried to solve the problem by defining the 'linear_model' variable as float (linear_model = 1.0) or tf.to_float(linear_model = W * x + b)</strong></p>
  
  <p>but nothing works</p>
  
  <p>Im a TensorFlow newbie, please help me out.
  Thanks in advance.</p>