Add ProjectTo(::Any) = identity#458
Merged
mcabbott merged 2 commits intoJuliaDiff:masterfrom Sep 21, 2021
Merged
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.
|
Member
Author
|
Bump? |
Member
|
I would like more voices on #442 before I merge |
oxinabox
reviewed
Sep 20, 2021
| @@ -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 | |||
oxinabox
reviewed
Sep 20, 2021
oxinabox
reviewed
Sep 20, 2021
Co-authored-by: Lyndon White <oxinabox@ucc.asn.au>
Member
Author
|
Great let's do this. |
Member
Author
|
Oh no the version is in fact wrong. Mind if I commit it straight to master? |
Member
|
yeah that's fine |
Member
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #442, I think.
Besides
ProjectTo(::Any) = identity, this also adds a few methods marking things likeSymbol, Charas non-differentiable. Could also just leave them alone.