https://medium.com/@monocosmo77/working-with-contrastive-divergence-part3-machine-learning-c61f95977a99