title: How to freeze specific nodes in a tensorflow variable while training?
body: <p>Currently I am having trouble in making a few elements in a variable as non-trainable. It implies that given a variable such as x,</p>
  
  <pre><code>x= tf.Variable(tf.zeros([2,2]))
  </code></pre>
  
  <p>I wish to train only x[0,0] and x[1,1] while keeping x[0,1] ans x[1.0] as fixed while training. </p>
  
  <p>Currently tensorflow does provide the option to make any variable non-trainable by using <code>trainable=False</code> or <code>tf.stop_gradient()</code>. However, these method will make the all element in <code>x</code> as non-trainable. My question is how to obtain this selectivity?</p>