Implemented Hinton's RBM from the Coursra course into rbm.py