Skip to content

A series of neural network implementations in Clojure, building up from a version with no external dependencies to a version using neanderthal.

Notifications You must be signed in to change notification settings

stephenxxxx/clojure-neural-networks-from-scratch

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural networks from scratch in Clojure

A series of neural network implementations in Clojure, building up from a version with no external dependencies to a version using neanderthal.

Structure

src/ contains four neural network implementation namespaces, each building upon the last.

resources/ contains the MNIST training data in a Clojure-friendly format.

mnist-scittle/ embeds code for handwritten digit recognition in a web app using scittle. Run it with bb mnist:

The recognition code — besides the weights and biases — is quite small, and doesn't have any dependencies. Of course, it's the training that's the hard part :)

Tests

It was enormously helpful to generate test vectors from existing neural network libraries and use them at the REPL during development, especially for the backpropagation algorithm.

Browse the files under src/ to see the tests inside rich comment blocks, for example this backpropagation gradient test.

Run tests with bb test.

Resources

I can recommend:

About

A series of neural network implementations in Clojure, building up from a version with no external dependencies to a version using neanderthal.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Clojure 99.9%
  • Other 0.1%