training rbm with other inference algorithms