https://github.com/dirmeier/clad
Reverse-mode autodiff for Clojure
https://github.com/dirmeier/clad
autodiff autograd reverse-mode-autodiff
Last synced: 3 months ago
JSON representation
Reverse-mode autodiff for Clojure
- Host: GitHub
- URL: https://github.com/dirmeier/clad
- Owner: dirmeier
- License: gpl-3.0
- Created: 2022-03-21T10:38:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T20:40:28.000Z (about 3 years ago)
- Last Synced: 2025-01-17T06:45:46.653Z (5 months ago)
- Topics: autodiff, autograd, reverse-mode-autodiff
- Language: Clojure
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# clad
[](http://www.repostatus.org/#concept)
[](https://github.com/dirmeier/clad/actions)> Reverse-mode autodiff for Clojure
## Introduction
This package implements a proof-of-concept of reverse-mode autodiff in Clojure. It is mainly thought for learning Clojure,
hence it offers minimal functionality, lacks (code) quality, and is probably buggy.```{clojure}
(require '[clad.core :refer [grad]])(defn f [x y]
(/ (- 1.0 (Math/exp (- x)))
(+ 1.0 (Math/exp (- y)))))
(def g ((grad f 0) 2.0 1.0))g
=> 0.0989
```## Author
Simon Dirmeier sfyrbnd @ pm me