Restricted Boltzmann Machines were tough for me to grasp at first. Here I will attempt to explain them in the simplest terms possible. I believe this will be a good resource to anyone struggling with Geoffrey Hinton's Coursera course. This code draws from a course by cognitiveclass.ai which is an excellet deep learning resource I highly recommend. If you are only looking for a Tensorflow implementation of Contrastive Divergence, you can skip to the end of the tutorial.
JosephGatto/Simplified-Restricted-Boltzmann-Machines
Tensorflow implementation of Restricted Boltzmann Machine with Contrastive Divergence
Jupyter NotebookMIT