fixed RBM. the best weights are assigned at the end of update process.