Hi,
I’ve been trying many things without success, unfortunately. Basically, this is what I want:
X → PyTorch model → X* → TF model
Then, I can obtain the gradient w.r.t X* through the TF model, but I want to propagate it through the PyTorch model to obtain an X.grad.
This is how far I’ve come:
I’ve been using this and this to get so far.
I’m new to writing custom gradient functions, so my code probably doesn’t make much sense. Hope anyone can help out.
Thanks