If your interest is to follow the hype and become an "expert" in machine learning so that we can automate the world the rest of the way and our grandchildren can just play golf and video games, then the fast path is to learn TensorFlow, Scikit-Learn, or Keras while making money writing PHP apps for fortune 500 companies.
You can begin by finding some RBM example code that looks like it executes and has some example data or a link to some. Then download whatever of those common frameworks they use, and then study by following the path of least resistance as if you were a machine learning.
No joke. Many will make money from big corporations that way and probably already are. Also if the reason you want to do the RBMs manually is you want to see how they work, this is the way to go. Take apart what others wrote like you would an old lawnmower to learn about internal combustion engines.
If your interest is to learn about the nature of intelligence and consciousness because you like to discover new things, then take the trendy frameworks less seriously and learn what RBMs are and why they are being superseded by other architectures. In that case, learning about probability, calculus, and searching algorighms in 2D, 3D, and higher dimensions (and reading books that most of the trendy people would think were dated) is the best direction.
If you want to see if, in your lifetime, you can create a digital brain that you can teach to fix the lawnmower and then go mow your lawn (also no joke) then learn to code in C and C++ and learn sockets, other systems level programming, and how to access the DSP in a video card because your going to need some blinding speed and parallelism.