Created
July 9, 2021 06:06
-
-
Save VedPDubey/2eee5638f74800b5fd039f3bc33915c9 to your computer and use it in GitHub Desktop.
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
np.random.seed(42) | |
np.random.shuffle(images) | |
np.random.seed(42) | |
np.random.shuffle(labels) | |
total_count = len(images) | |
total_count | |
train = int(0.7*total_count) | |
val = int(0.2*total_count) | |
test = int(0.1*total_count) | |
train_images, train_labels = images[:train], labels[:train] | |
val_images, val_labels = images[train:(val+train)], labels[train:(val+train)] | |
test_images, test_labels = images[-test:], labels[-test:] | |
train_images.shape, val_images.shape, test_images.shape |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment