Skip to content

nickpoorman/nnet

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is up to date with Sentimentron/nnet:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
dbn
 
 
 
 
 
 
mlp
 
 
 
 
rbm
 
 
 
 
 
 
 
 
 
 
 
 
 
 

NNET - Neural Networks in Go Build Status

NNET is a small collection of neural network algorithms written in the pure Go language.

Packages

  • rbm - Binary-Binary Restricted Boltzmann Machines (RBMs)
  • gbrbm - Gaussian-Binary RBMs
  • mlp - Multi-Layer Perceptron (Feed Forward Neural Networks)
  • mlp3 - Three-Layer Perceptron
  • dbn - Deep Belief Nets (in develop stage)

Install

go get github.com/r9y9/nnet

Examples

Binary-Binary Restricted Bolztmann Machines on MNIST

cd examples/rbm
go run rbm_mnist.go -h # for help
go run rbm_mnist.go -epoch=5 -hidden_units=400 -learning_rate=0.1 -order=1 -output="rbm.json" -persistent -size=20

It took 32 minutes to train RBM on my macbook air at 07/28/2014.

Weight visualization

python visualize.py rbm.json

image

Multi-layer Perceptron

Training

cd examples/mlp3
go run mlp3_mnist.go -epoch=500000 -hidden_units=100 -learning_rate=0.1 -o="nn.json"

It took 10 minutes to train MLP on my macbook air at 07/30/2014.

Classification

go run mlp3_mnist.go -test -m=nn.json
...
Acc. 0.971000 (9710/10000)

TODO

  • Use linear algebra library such as gonum/matrix or go.matrix
  • GPU powered training
  • Refactor (write more idiomatic codes, speedup, etc.)
  • Tests for all packages
  • More flexibility like pylearn2

License

MIT

About

A small collection of neural network algorithms in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages

  • Go 98.9%
  • Python 1.1%