Differentiable Indexing

Not directly. I want to set values in a tensor via indexing and I need this operation to be differentiable w.r.t to the indices.

Basically what I want is a version of tensor[idices] = m which is differentiable w.r.t indices