TypeError: 'Tensor' object does not support item assignment in TensorFlow
<p>I try to run this code:</p>

<pre><code>outputs, states = rnn.rnn(lstm_cell, x, initial_state=initial_state, sequence_length=real_length)

tensor_shape = outputs.get_shape()
for step_index in range(tensor_shape[0]):
    word_index = self.x[:, step_index]
    word_index = tf.reshape(word_index, [-1,1])
    index_weight = tf.gather(word_weight, word_index)
    outputs[step_index,  :,  :]=tf.mul(outputs[step_index,  :,  :] , index_weight)
</code></pre>

<p>But I get error on last line: 
<code>TypeError: 'Tensor' object does not support item assignment</code>
It seems I can not assign to tensor, how can I fix it?</p>