Fix issue in rbm_train.m and update the getNextXY in nn_train.m