-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
gradient returns nothing for sum(abs2, x)
with a complex CuArray
#1121
Comments
Definitely a bug! Could you check on older Zygote releases, say v0.6.3? |
Yes, on version v0.6.3 it works correctly
|
I wonder if it's related to the recent projection related issues too. |
The problem occurs when using Flux, where Zygote is v0.6.30. If you install Zygote without Flux, then Zygote is v0.6.12 and everything works correctly. |
This used to go here: After #990 and #1004 it goes here, which calls the adjoint for broadcasting: And that won't work, because broadcasting doesn't handle complex CuArrays at all, it treats them as if they are non-differentiable: You could fix Xref #961. No relation to projection. |
sum(abs2, x)
with a complex CuArray
Good shout on the broadcasting changes. It's hard to say how some functions may silently break, the answer is probably to make sure the non broadcasted adjoint is hit in this case anyway. It would be tedious to have two adjoint rules to forward it manually, maybe we should take a look at what functions are broken due to the changes in the map adjoint. |
Bumping this: Is there any update on this issue other than to use older Zygote and Flux versions pre-broadcasting changes? |
This is causing problems for me as well. Zygote gradients of other things like |
Broadcasting with complex numbers has never worked on the GPU, sadly, this hasn't changed. It should be an error but isn't. It could certainly be made to work, but someone has to do it. A few special cases could more easily be made to work, too; I guess |
closed in #1324 |
gradient
returnsnothing
forCuArrays{ComplexF32}
, but works fine withArrays{ComplexF32}
:real
andimag
behave similarly toabs2
The text was updated successfully, but these errors were encountered: