Implemented an rbm, looks like it works. Further testing to be done.