Skip to content

Instantly share code, notes, and snippets.

@miki998
Created April 13, 2020 09:44
Show Gist options
  • Save miki998/4f0d8bdfd537d2825ff7ee3f3c1ed03c to your computer and use it in GitHub Desktop.
Save miki998/4f0d8bdfd537d2825ff7ee3f3c1ed03c to your computer and use it in GitHub Desktop.
from sklearn.model_selection import train_test_split
X_train, X_cv, y_train, y_cv = train_test_split(df_features, df_label,
test_size = 0.2,
random_state = 1212)
X_train = np.array(X_train).reshape(33600, 784) #(33600, 784)
X_cv = np.array(X_cv).reshape(8400, 784) #(8400, 784)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment