Git Product home page Git Product logo

ad's Introduction

automatic or algorithmic differentiation in go

a simple mathematical formula language, which is auto-differentiated and compiled to http://golang.org for high performance.

see https://autodiff.info for live demo.

to get started: make sure you have latest golang.org installed (e.g. https://golang.org/dl/), or build it yourself via https://github.com/xoba/goinit

then:

git clone --recursive https://github.com/xoba/ad.git
cd ad
source goinit.sh
./install.sh
run compile -formula "f := sqrt(abs(a+b*b))"
go run compute.go

for help, you can try:

run
run compile -help
run nn -help

it runs with both scalar and slice variables; e.g.:

run compile -formula "f:= 2*x[0]+1 + a + x[1] * sin(x[2]) + z/y[0]"

to develop with emacs:

./ide.sh

to auto-generate various code:

./gogenerate.sh

to run a simple neural network example:

run nn

which produces one of these two videos (first one has 5 hidden units second one has none, and is equivalent to logistic regression):

  1. https://s3.amazonaws.com/xoba-videos/test_5.mp4
  2. https://s3.amazonaws.com/xoba-videos/test_0.mp4

in these movies, white pixels are correctly guessed classes, red are incorrect. class#1 is a circle embedded in a 2-d feature space, class#2 is everything else. "time" in the movie is monotonic with training iteration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.