Randomly slicing matrix for training.