Skip to content
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

added type for differentiate in chain_rules.jl #214

Open
wants to merge 1 commit into
base: bl/chain_rules
Choose a base branch
from

Conversation

harris-mit
Copy link

  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.

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.
@harris-mit
Copy link
Author

Above I mean the function name "pullback" is generic, so I made the name more descriptive.

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants