Solved by SoerenMind in post #9 
              
              
                I found a solution: Updating the Module._parameters dictionary directly: 
# Inner optimization
for k in range(n_inner_opt):
      true_objective2 = game_NN.true_objective(net2_, net1)
      grad2 = torch.autograd.grad(true_objective2, net2_.parameters(), create_graph=True)
      'In the following li…