this function do a bottom-up pretraining in a single rbm