title: How to assign values to a subset of a tensor in tensorflow?
body: <p>Two parts to this question:</p>
  
  <p>(1) What is the best way to update a subset of a tensor in tensorflow? I've seen several related questions:</p>
  
  <p><a href="https://stackoverflow.com/questions/34685947/adjust-single-value-within-tensor-tensorflow">Adjust Single Value within Tensor -- TensorFlow</a>
  and
  <a href="https://stackoverflow.com/questions/39859516/how-to-update-a-subset-of-2d-tensor-in-tensorflow">How to update a subset of 2D tensor in Tensorflow?</a></p>
  
  <p>and I'm aware that Variable objects can be assigned using Variable.assign() (and/or scatter_update, etc.), but it seems very strange to me that tensorflow does not have a more intuitive way to update a part of a Tensor object. I have searched through the tensorflow api docs and stackoverflow for quite some time now and can't seem to find a simpler solution than what is presented in the links above. This seems particularly odd, especially given that Theano has an equivalent version with Tensor.set_subtensor(). Am I missing something or is there no simple way to do this through the tensorflow api at this point?</p>
  
  <p>(2) If there is a simpler way, is it differentiable?</p>
  
  <p>Thanks!</p>