-
Notifications
You must be signed in to change notification settings - Fork 163
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
The alternative to ifelse
#16
Comments
JuliaLang/julia#32844 hopefully this changes in Base. |
ChrisRackauckas
referenced
this issue
in SciML/ModelingToolkit.jl
Sep 2, 2020
It's time we finally handle #531, https://github.com/SciML/ModelingToolkit.jl/issues/532, and https://discourse.julialang.org/t/differentiation-method-for-element-wise-abs-function-applied-on-operation-types-in-modelingtoolkit-jl/45867/4 . This PR creates a `ModelingToolkit.ifelse` with derivative fixes for `abs` to make it so standard conditional code can work. While tracing cannot correctly make these operations, this would at least allow directly written symbolic code to handle conditions, so we're at least as good (or bad) as TensorFlow.
The solution ended up being https://github.com/SciML/IfElse.jl |
AFAICT this issue can be fixed since it was fixed upstream. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ifelse
is a bit problematic for symbolic libraries because it's in Core and not in Base and dispatch cannot be added to it. So, while we want to represent branching, we need to do so without usingifelse
. The opportunities are something like:ModelingToolkit.ifelse
_ifelse
(exported)We need to just pick one and start using it, and whatever is chosen is what the eventual tracer should transform things to.
┆Issue is synchronized with this Trello card by Unito
The text was updated successfully, but these errors were encountered: