I've been working on an automatic differentiation library recently and thought I'd share the current work-in-progress. I've had fun writing it and have learned a lot about the Racket macro system in the process!
- Rackpropagator on GitHub
- docs
raco pkg install rackpropagator
It provides so-called 'reverse mode' AD, implemented as syntax transformation. A function definition (written in a subset of Racket) can be macro-transfomed into a function that also computes its gradient. See the docs for some examples and references.
The output it produces can be quite inefficient at the moment, along with a few other limitations. I'm currently thinking about how to improve this.
Also, the build on the package server seems to be failing, although I'm not sure why.