-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
differentiable type includes integer? #419
Comments
It's a good point I think, there's no discussion about this before, since most people focus on how to make things work at the moment. I believe you can always block these by adding more restricted rules, I think currently it's just because it is generated from DiffRules directly: https://github.com/FluxML/Zygote.jl/blob/master/src/lib/number.jl#L8 However, I'm not sure if there are any actual use cases that will use Integer in reverse mode, thus I'm not sure if we should have more restrict rules on this, PS. maybe should just dispatch to ChainRules in the future to let ChainRules handle this? |
See the first half of this comment. In particular: types are not differentiable or non-differentiable, they just represent certain values. Functions can be continuous or discontinuous, differentiable or non-differentiable, etc. |
say f(x)=2x, f'(10) gets 2. Seen from @code_llvm, the gradient function of
f
simply returns 2.What is differentiable type in Zygote? What is non-differentiable type? Here 10 is integer type. Does it matter or not?
The text was updated successfully, but these errors were encountered: