Yes, this is most likely caused by the usage of inplace=True, if the inputs are needed in an unmodified state to calculate the gradients as previously mentioned.
This post 1 gives a small example why inplace ops are disallowed for specific (chains of) operations.