Training of RBM