Context: I am solving a PDE using CNN. And I need gradient of P w.r.t X.
P=[p1 p2 ; p3 p4 ], X= [x1 x2; x3 x4]
I need gradient of P w.r.t X. But Tensorflow gives me the sum of all the partials.
Stackoverflow doesn't allow me to post in latex format. So here's the same question I could post on Math.Stachexchange. Please click on this link for better clarity:
https://math.stackexchange.com/questions/3408736/finding-gradients-in-tensorflow-without-sum
What do I need to do to get the gradients as I need? I'd really appreciate your help. Searching for similar questions here didn't help.