This library contains an implementation of an RBM and a DBN as well as several other helper files. Feel free to look at the code and edit it yourself.