add test for contrastive divergence
fix gibbs