added type for differentiate in chain_rules.jl#214
Open
harris-mit wants to merge 1 commit intoJuliaAlgebra:bl/chain_rulesfrom
Open
added type for differentiate in chain_rules.jl#214harris-mit wants to merge 1 commit intoJuliaAlgebra:bl/chain_rulesfrom
harris-mit wants to merge 1 commit intoJuliaAlgebra:bl/chain_rulesfrom
Conversation
harris-mit
commented
Jun 14, 2022
- We should make sure that differentiate is being called on a polynomial p. (It is possible there are other meanings of differentiate for other types in the code.)
- The function "pullback" is very generic, so I added some clarity.
1. We should make sure that differentiate is being called on a polynomial p. (It is possible there are other meanings of differentiate for other types in the code.) 2. The function "pullback" is very generic, so I added some clarity.
Author
|
Above I mean the function name "pullback" is generic, so I made the name more descriptive. |
blegat
reviewed
Jun 15, 2022
| return ChainRulesCore.NoTangent(), x * differentiate(x * Δdpdx, x), ChainRulesCore.NoTangent() | ||
| end | ||
| function ChainRulesCore.rrule(::typeof(differentiate), p, x) | ||
| function ChainRulesCore.rrule(::typeof(differentiate), p::APL, x) |
Member
There was a problem hiding this comment.
Is that resolving an issue you had ? differentiate is defined by this package so I don't think it would give issue to not specify the type here
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.