On the equivalence of Hopfield networks and Boltzmann Machines