title: Change device placement of an existing tensorflow variable
body: <p>How do I change the device placement of a tf.Variable() ?
  I tried two methods</p>
  
  <pre><code>a = tf.Variable(1,name = 'a')  # a's device is not set
  with tf.device('/gpu:0'):
      a = tf.get_variable('a',1)   
  </code></pre>
  
  <p>this creates a new variable on the gpu and doesn't change device assignment for <strong>a</strong></p>
  
  <p>I tried enforcing variable reuse by using </p>
  
  <pre><code>tf.get_variable_scope().reuse_variables()
  </code></pre>
  
  <p>Here is the code :</p>
  
  <pre><code>a = tf.Variable(1,name = 'a')  # a's device is not set
  tf.get_variable_scope().reuse_variables()
  with tf.device('/gpu:0'):
      a = tf.get_variable('a',1)   
  </code></pre>
  
  <p>this creates a new variable on the gpu and doesn't change device assignment for <strong>a</strong></p>
  
  <p>This time, I get an error saying the variable <strong>a</strong> did not exist in the gpu.</p>
  
  <p>Any help on changing-device-placement or lazy-device-assignment would be appreciated. Thanks</p>