Created
January 15, 2019 18:40
-
-
Save virtualdvid/251dcd499b3dcc45c016339d72d7790f to your computer and use it in GitHub Desktop.
load dataset
This file contains hidden or 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
# Image Preprocessing | |
start_time = time.time() | |
dataset = Images('flowers', 'flowers', config=['resize=(128,128)', 'store']) | |
print("Preprocessing: ", int(time.time() - start_time), "secs") | |
print("Classes", dataset.classes, "Images:", dataset.count) | |
curr_mem = psutil.virtual_memory().used | |
print("Memory Used: %.2f GB" % ((curr_mem - start_mem) / GB)) | |
# Extract dataset into memory | |
dataset.split = 0.0 # use the entire dataset | |
X_train, X_test, Y_train, Y_test = dataset.split | |
# Release unused memory | |
gc.collect() | |
time.sleep(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment