Get the latest tech news
Show HN: Boldly go where Gradient Descent has never gone before with DiscoGrad
DiscoGrad - automatically differentiate across conditional branches in C++ programs - DiscoGrad/DiscoGrad
Unfortunately, AD alone often yields unhelpful (zero-valued and/or biased) gradients for programs involving both parameter-dependent branching control flow such as if-else statements and randomness, including various types of simulations. To run a smoothed program and compute its gradient, simply invoke the binary with the desired CLI arguments, for example Note: When all branches occur directly on discrete random variables drawn from distributions of known shape, StochasticAD may be a well-suited alternative to the above estimators.
Or read this on Hacker News