2 ms·
Dealing with branches is indeed and interesting problem. Many AD systems can't accomodate branches. I think most of the Julia ones do. The gist of it is that b
by eigenspace 6y ago
Dealing with branches is indeed and interesting problem. Many AD systems can't accomodate branches. I think most of the Julia ones do.
The gist of it is that branches don't actually require that much fanciness, but they can introduce discontinuties, and AD systems will often do things like happily give you a finite derivative right at a discontinuity where a calculus student would normally complain.