Sampling Gibbs Distribution for Ising Model using Machine Learning