Hi,
If you do c = a * b. And get the gradients for a given the gradient for c as gc, you get ga = gc * b.
As you can see, the value of b is needed for by the backward pass to be computed properly.
The autograd engine needs to make sure that if you change b, then it needs to raise an error because it can’t compute the gradients for a anymore.
The thing is that if you change b.data inplace. The autograd engine will not know it and will compute ga = gc * b with no error even though the content of b has changed and so the computed gradient will be wrong.
Hope this helps !