Skip to content

Instantly share code, notes, and snippets.

@AmrutaKoshe
Created July 13, 2021 07:55
Show Gist options
  • Save AmrutaKoshe/443c5a20500846628024cf3b5b02279d to your computer and use it in GitHub Desktop.
Save AmrutaKoshe/443c5a20500846628024cf3b5b02279d to your computer and use it in GitHub Desktop.
from sklearn.model_selection import train_test_split
X_train, X_val, y_train, y_val = train_test_split(Train_Imgs, Train_Lbls, shuffle = True, test_size = 0.2, random_state = 42)
print('Shape of X_train: {}, y_train: {} '.format(X_train.shape, y_train.shape))
print('Shape of X_val: {}, y_val: {} '.format(X_val.shape, y_val.shape))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment