Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/slamko/deep-racket

Little Deep Learning framework in Racket
https://github.com/slamko/deep-racket

ai deep-learning functional-programming lisp machine-learning neural-network racket

Last synced: about 1 month ago
JSON representation

Little Deep Learning framework in Racket

Awesome Lists containing this project

README

        

*** Little deep learning framework based on Perceptron algorithm
Implemented in Typed Racket for better performance with Matrix library

Library part lives in deep.rkt file:

To try it out in your racket code:
#+begin_src lisp
#!/usr/bin/env racket
#lang racket

(require "deep.rkt")
(require math/matrix)

(define xor-output
(list
(matrix [[0]])
(matrix [[1]])
(matrix [[1]])
(matrix [[0]])))

(define xor-input
(list
(matrix [[0 0]])
(matrix [[0 1]])
(matrix [[1 0]])
(matrix [[1 1]])))

(define nn (make-nn '(2 5 1)))
(define trained-nn (learn nn xor-input xor-output 1 (* 10 1000)))

(perform trained-nn xor-input xor-output)
#+end_src

app.rkt provides similar interface from the command line:
#+begin_src sh
./app.rkt 10000 -a 2 5 1
#+end_src