[Solved][Pytorch1.5] RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation

Hi,

This is most likely happening because value_optimizer.step() actually modifies the weights of the model inplace while the original value of these weights is needed to compute action_loss.backward().
Is that the issue?

7 Likes