Mercurial > lbo > hg > autodiff
changeset 4:f88dda95d735
Add README
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Thu, 23 Dec 2021 08:17:55 +0100 |
parents | 0f2249f75a9e |
children | f508e566dc78 |
files | README.md |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Thu Dec 23 08:17:55 2021 +0100 @@ -0,0 +1,10 @@ +# miniautodiff + +This is not productivity-level code: it's written in order to be understood. Therefore, +just dive into the source! + +* `autodiff.py` is a classic, naive reverse-mode algorithm. Gradients are propagated + in reverse through the expression tree. +* `gad.py` propagates gradients forward through the expression tree. Despite being forward + mode, gradients w.r.t. each argument are calculated simultaneously. Therefore it will + scale with the number of function values, not the number of arguments.