-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Efficient complex differentiation by structured 2x2 matrices #87
Comments
these structured matrixes would subtype But they are not matrixes as such since they don't multiply with scalars as matrixes do, do they? |
A complex number can be interpreted as
So multiply with a complex number is the same as multiplying with a |
Ah, ok So all parameters in the matrixs are Real / differentials for real primals. |
Yes, |
I have been thinking about exactly this as well and can definitely see your point. On the other hand, what's definitely nice about |
I am not sure about using One could implement The point of using different types of 2x2 matrices is exactly not to use All in all, I still don't see a compelling argument for using Wirtinger derivative. |
xref #40 |
Indeed types are cheap. One thing I will note: Wether this is wise or not, I am not sure. If it is useful to have both, which I can imagine. |
For efficient complex differentiation, we need to express the following structured matrices:
holomorphic:
anti-holomorphic:
C->R:
R->C:
general:
Wirtinger derivative archives this by doing a basis transformation from
x, y
toz, z̄
. However, that would introduce more FLOPs, since you need to transform them tox, y
when multiplying a complex number. I.e.(x = z+z̄)
and(y = i(z - z̄))
IMO, structured matrices are far more transparent than Wirtinger derivative, and they don't require a change of basis before multiplying with a complex number.
To implement structured matrices, we could do
The text was updated successfully, but these errors were encountered: