Unsupervised learning of distributions on binary vectors using two layer networks