-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Minimizing sum fails #1510
Comments
I think we just have to handle Fills properly in apply! |
This is likely a regression in NNlib or Zygote, because we haven't broken the optimisation in here |
I don't think Zygote is the issue, since the gradient is properly computed. Maybe For instance, something like apply!(opt, x, g::AbstractArray) = apply!(opt, x, Array(g)) # copy g if it is not mutable
apply!(opt, x, g::Array) = ... # normal code here that mutates g |
I think its that Fill doesn't want to eagerly collect, which is great, but it can lead to edge cases |
1613: use ArrayInterface.restructure in update! r=CarloLucibello a=CarloLucibello Suggestion coming from @ChrisRackauckas in FluxML/Zygote.jl#989. Now `update!` handles basically any gradient Zygote emits, e.g. FillArrays and Zygote.OneElement. Fix #1510 Co-authored-by: CarloLucibello <[email protected]>
Throws the following error:
The text was updated successfully, but these errors were encountered: