Replies: 2 comments 5 replies
-
import jax
def wirtinger_derivatives(fun):
def fun_xy(x, y):
return fun(x + y *1j)
def derivative(z):
x, y = z.real, z.imag
dx, dy = jax.grad(fun_xy, argnums=(0, 1))(x, y)
return (dx - dy * 1j) / 2
return derivative |
Beta Was this translation helpful? Give feedback.
5 replies
-
@mattjj without being presumptuous, do you want I try to write a little paragraph on this and the Wirtinger derivatives to be added on the page Autodiff Cookbook ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone !
I am a beginner with Jax. I understand the principles but I am trying to use it with complex calculus.
In my case, I am trying to optimize nanophotonics structures.
On a part of my code, I want to differentiate this kind of equation$\frac{\partial}{\partial z}|z|^2$ which is equal to $\overline{z}$ (with respect to Wirtinger derivatives).
And this is where problems start.. I do not understand how I can find such a result using jvp / vjp. From Autodiff Cookbook, I understand that we get a Jacobian but I am having a hard time to connect it to Wirtinger derivatives. (I also took a look to #1853 or #3402).
Can anyone give me some insight ?
Thanks in advance,
Differentially yours,
Lucas.
Beta Was this translation helpful? Give feedback.
All reactions