Hi Pytorcher!



 pytorcher:


RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation



Inplace operations can “break the computation graph” and therefore
prevent proper backpropagation.  (The autograd engine flags this for
you, I guess because it can lead to hard-to-debug errors.)
But you originally asked:


Is there a way to do in place operations when you are accessing a tensor by reference?


Why is it that you want to perform an inplace operation, and how
would you want this operation to interact with backpropagation?
Would it make sense not to use an inplace operation and just let
autograd do its normal thing?
Best.
K. Frank