I failed to provide a simple RBM implementation, but you could refer to the following pages.