Created
September 5, 2018 03:00
-
-
Save Svtter/b76de02b65a808d4345caffba904e87a to your computer and use it in GitHub Desktop.
[shuffle data] shuffle the dataset when its ordered 打乱数据 #python #numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# shuffle the data. | |
idx = np.random.permutation(len(x_all)) | |
x_all, y_all = x_all[idx], y_all[idx] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment