We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
fill!
I believe these should all be (Zero, 3):
(Zero, 3)
julia> Zygote.gradient((x,y) -> sum(fill!(x,y)), [1,2,3], 4) (nothing, nothing) julia> Zygote.gradient((x,y) -> sum(map(_ -> y, x)), [1,2,3], 4) ([nothing, nothing, nothing], 3) julia> Diffractor.gradient((x,y) -> sum(fill!(x,y)), [1,2,3], 4) (ChainRulesCore.NoTangent(), ChainRulesCore.NoTangent()) julia> Diffractor.gradient((x,y) -> sum(map(_ -> y, x)), [1,2,3], 4) ERROR: AssertionError: Base.issingletontype(typeof(f)) Stacktrace: [1] (::∂⃖{1})(#unused#::typeof(map), f::Function, a::Vector{Int64}) @ Diffractor ~/.julia/packages/Diffractor/K2lJa/src/jet.jl:185
More generally, should in-place functions which completely overwrite their input be allowed? Like circshift! or sum! or mul!.
circshift!
sum!
mul!
The text was updated successfully, but these errors were encountered:
In forward mode they should be allowed. In reverse they shouldn't (yet)
Sorry, something went wrong.
Oh right. Because some pullback may be relying on this array still having the same values, when it eventually gets called.
Successfully merging a pull request may close this issue.
I believe these should all be
(Zero, 3)
:More generally, should in-place functions which completely overwrite their input be allowed? Like
circshift!
orsum!
ormul!
.The text was updated successfully, but these errors were encountered: