How to do slice assignment in Tensorflow
<p>I found that Tensorflow provides <code>scatter_update()</code> to assign values to the slice of a tensor in the 0 dimension. For example, if the tensor <code>T</code> is three dimensional, I can assign value <code>v[1, :, :]</code> to <code>T[i, :, :]</code>. </p>

<pre><code>a = tf.Variable(tf.zeros([10,36,36]))   
value = np.ones([1,36,36])   
d = tf.scatter_update(a,[0],value)

with tf.Session() as sess:
    sess.run(tf.initialize_all_variables())
    print a.eval()
    sess.run(d)
    print a.eval()
</code></pre>

<p>But how to assign values <code>v[1,1,:]</code> to <code>T[i,j,:]</code>?  </p>

<pre><code>a = tf.Variable(tf.zeros([10,36,36]))   
value1 = np.random.randn(1,1,36)    
e = tf.scatter_update(a,[0],value1) #Error

with tf.Session() as sess:
    sess.run(tf.initialize_all_variables())
    print a.eval()
    sess.rum(e)
    print a.eval()
</code></pre>

<p>Is there any other function that TF provide or a simple way to do this?</p>