https://medium.com/@monocosmo77/working-with-restricted-boltzmann-machines-part2-machine-learning-d52c139a9d3e