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
julia> using Zygote, ChainRules, ChainRulesCore julia> x = BitArray([0]) julia> _, back = rrule(AbstractArray{Float64}, x) julia> (::ProjectTo{NoTangent})(::AbstractThunk) = NoTangent() julia> back([1.0]) (NoTangent(), NoTangent()) julia> back(@thunk([1.0])) ERROR: MethodError: (::ProjectTo{NoTangent, @NamedTuple{}})(::Thunk{var"#1#2"}) is ambiguous.
CC @oxinabox @mcabbott @ToucheSir
From a conversation on Slack, the fix seems to be to define the method:
(::ProjectTo{NoTangent}(::Thunk) = NoTangent()
The text was updated successfully, but these errors were encountered:
You also need
(::ProjectTo{NoTangent}(::AbstractThunk) = NoTangent()
So that the sane thing bug written with InplaceableThunks doesn't have the same problem.
InplaceableThunks
This should give a performance win, because it avoids unthunking
Sorry, something went wrong.
No branches or pull requests
CC @oxinabox @mcabbott @ToucheSir
From a conversation on Slack, the fix seems to be to define the method:
The text was updated successfully, but these errors were encountered: