Skip to content

Source code for a series of blog posts about recurrent neural networks (Elman, Jordan, LSTM)

License

Notifications You must be signed in to change notification settings

zavgorodnii/rnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rnn

Source code for a series of posts about recurrent neural networks. (It's in Russian though, beware.)

You'll need to install the linear algebra library for Go:

$ go get github.com/gonum/matrix/mat64

You can execute any of the examples in the blog like this:

$ go run main.go [--basicNN | --Elman | --Jordan | --LSTM]

For example, you can train an Elman network:

$ go run main.go --Elman
====================================================
Testing basic Vanilla RNN on sample series dataset:
====================================================
Epoch:  0
_________________________________________________________________
Input:  1  .  .  .  Expected:  .  1  .  .  Predicted:  1  .  .  1
Input:  .  1  .  .  Expected:  .  .  1  .  Predicted:  1  .  .  1
Input:  .  .  1  .  Expected:  .  .  .  1  Predicted:  1  .  .  1
Input:  .  .  .  1  Expected:  .  .  1  .  Predicted:  1  .  .  1
Input:  .  .  1  .  Expected:  .  1  .  .  Predicted:  1  .  .  1
Input:  .  1  .  .  Expected:  1  .  .  .  Predicted:  1  .  .  1

Epoch:  1000
_________________________________________________________________
Input:  1  .  .  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  .  .  1  .  Predicted:  .  .  .  .
Input:  .  .  1  .  Expected:  .  .  .  1  Predicted:  .  1  .  .
Input:  .  .  .  1  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  1  .  .  .  Predicted:  .  .  1  .

Epoch:  2000
_________________________________________________________________
Input:  1  .  .  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  .  .  1  Predicted:  .  1  .  .
Input:  .  .  .  1  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  1  .  .  .  Predicted:  .  .  1  .

Epoch:  3000
_________________________________________________________________
Input:  1  .  .  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  .  .  1  Predicted:  .  .  .  .
Input:  .  .  .  1  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  1  .  .  .  Predicted:  .  .  1  .

Epoch:  4000
_________________________________________________________________
Input:  1  .  .  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  .  .  1  Predicted:  .  .  .  1
Input:  .  .  .  1  Expected:  .  .  1  .  Predicted:  .  .  1  .
Input:  .  .  1  .  Expected:  .  1  .  .  Predicted:  .  1  .  .
Input:  .  1  .  .  Expected:  1  .  .  .  Predicted:  1  .  .  .

This repository also contains source code for RNNs implemented in Python using the awesome Tensorflow library. You'll need to install tensorflow to run those sources.

About

Source code for a series of blog posts about recurrent neural networks (Elman, Jordan, LSTM)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published