Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 758 Bytes

README.md

File metadata and controls

28 lines (18 loc) · 758 Bytes

clad

Project Status Build status

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.

(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