Gradient of a complex scalar with respect to a real vector

51 Views Asked by At

I have a question regarding a regression problem. Suppose vector $\mathbf{p}$ is real and has length N. Now suppose $\mathbf{p}$ is the input to the following equation: $$ y = f(e^{i\mathbf{p}}) $$ Where $f()$ is some function with a complex vector as input and a complex scalar as output and where $e^{i\mathbf{p}}$ is an element wise operation.

Given that I have data on y and I know $f()$, how would I use gradient descent to find the optimal $\mathbf{p}$? The gradient of $y$ w.r.t. $\mathbf{p}$ is complex, but $\mathbf{p}$ is real. Therefore it is not possible to update $\mathbf{p}$ with the negative gradient directly. Do I only use the real part of the gradient?