The thing is I need the gradients of the two parts separately. The main issue I am facing seems to be continuing the first part’s gradients backwards from the second part.
I would appreciate any help as to how I can achieve this. Thanks
I am not sure to understand the issue. Can you extract the corresponding gradients from grads?
Or provide only the subset of the parameters you are interested in to autograd.grad()?