-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add ProjectTo(::Any) = identity
#458
Conversation
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
==========================================
+ Coverage 92.94% 93.02% +0.07%
==========================================
Files 14 14
Lines 794 803 +9
==========================================
+ Hits 738 747 +9
Misses 56 56
Continue to review full report at Codecov.
|
Bump? |
I would like more voices on #442 before I merge |
@@ -143,6 +144,11 @@ ProjectTo{P}(::NamedTuple{T, <:Tuple{_PZ, Vararg{<:_PZ}}}) where {P,T} = Project | |||
# Bool | |||
ProjectTo(::Bool) = ProjectTo{NoTangent}() # same projector as ProjectTo(::AbstractZero) above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Combine with below?
Co-authored-by: Lyndon White <oxinabox@ucc.asn.au>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge when happy.
Great let's do this. |
Oh no the version is in fact wrong. Mind if I commit it straight to master? |
yeah that's fine |
FluxML/Zygote.jl#1044 has been updated to use this, and simplified. It needs someone's approval. Seems uncontroversial & would be nice to get in before it goes stale. |
Closes #442, I think.
Besides
ProjectTo(::Any) = identity
, this also adds a few methods marking things likeSymbol, Char
as non-differentiable. Could also just leave them alone.