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
Consider:
julia> my_id(x) = x my_id (generic function with 1 method) julia> function ChainRulesCore.rrule(::typeof(my_id), x) my_id_pb(ȳ) = (NoTangent(), ȳ) function my_id_pb(ȳ::AbstractThunk) precision = rand() > 0.5 ? Float64 : Float32 return (NoTangent(), precision(unthunk(ȳ))) end return x, my_id_pb end julia> test_rrule(my_id, 2.0) Test Summary: | Pass Total test_rrule: my_id on Float64 | 7 7 Test.DefaultTestSet("test_rrule: my_id on Float64", Any[], 7, false, false)
while really we should be catching that the thunked cotangents result in type unstable pullbacks. This may seem obscure but is quite relevant because of closures being unstable if they call another method of themselves.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Consider:
while really we should be catching that the thunked cotangents result in type unstable pullbacks. This may seem obscure but is quite relevant because of closures being unstable if they call another method of themselves.
The text was updated successfully, but these errors were encountered: