Created
January 15, 2019 18:49
-
-
Save virtualdvid/4b8cf92b142d946b72397ebe885387a1 to your computer and use it in GitHub Desktop.
Gap: Flow
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
STEPS = 1000 | |
print("Gap: Flow") | |
start_mem = psutil.virtual_memory().used | |
start_time = time.time() | |
dataset.minibatch = 32 | |
train_generator = dataset.minibatch | |
print("PRE-TIME", time.time() - start_time) | |
start_time = time.time() | |
step = 0 | |
for x_batch, y_batch in train_generator: | |
step += 1 | |
if step > STEPS: break | |
print("TIME", time.time() - start_time) | |
curr_mem = psutil.virtual_memory().used | |
print("Memory Used: %.2f GB" % ((curr_mem - start_mem) / GB)) | |
# 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