Seperated transform from train_rbm() and created a new transform_x()