title: Is it possible to make a trainable variable not trainable?
body: <p>I created a <em><strong>trainable</strong> variable</em> in a scope. Later, I entered the same scope, set the scope to <code>reuse_variables</code>, and used <code>get_variable</code> to retrieve the same variable. However, I cannot set the variable's trainable property to <code>False</code>. My <code>get_variable</code> line is like:</p>
  
  <pre><code>weight_var = tf.get_variable('weights', trainable = False)
  </code></pre>
  
  <p>But the variable <code>'weights'</code> is still in the output of <code>tf.trainable_variables</code>.</p>
  
  <p>Can I set a shared variable's <code>trainable</code> flag to <code>False</code> by using <code>get_variable</code>?</p>
  
  <p>The reason I want to do this is that I'm trying to reuse the low-level filters pre-trained from VGG net in my model, and I want to build the graph like before, retrieve the weights variable, and assign VGG filter values to the weight variable, and then keep them fixed during the following training step. </p>