Hi, all.
I want to exchange the gradients of two networks.
then this code works fine?
loss.backward()
for p,q in zip(model1.parameters(), model2.parameters()):
    p.grad = q.grad
    q.gard = p.grad
optimizer.step()