Hi,  dose autograd support in-place setting value?
from torch.autograd import Variable

invar = Variable(torch.rand(5, 5), requires_grad=True)
midvar = invar + 1
midvar.data[:, 0] = 0
loss = midvar.sum()
loss.backward()
print(invar.grad.data)

the output is
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1
 1  1  1  1  1

I hope the grad of invar should be
 0  1  1  1  1
 0  1  1  1  1
 0  1  1  1  1
 0  1  1  1  1
 0  1  1  1  1

If it is not supported, is there any way to implement this function? Encapsulate it as a torch.autograd.Function ?