function ret = cd1(rbm_w, visible_data) % is a matrix of size