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 gives a small example why inplace ops are disallowed for specific (chains of) operations.
1 Like