Hi,
You cannot always do inplace operations as some values are needed to compute gradients and so the backward cannot happen if you changed these values with an inplace operation.
To find which one is the problem, you should remove all the inplace operations and then add them back one by one.