Guest User

Untitled

a guest
Jan 15th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. print("Gap: Flow with Augmentation")
  2.  
  3. dataset = Images(augment=['rotate=-30,30'])
  4. dataset.load('flowers')
  5. start_mem = psutil.virtual_memory().used
  6.  
  7. start_time = time.time()
  8.  
  9. dataset.minibatch = 32
  10. train_generator = dataset.minibatch
  11.  
  12. print("PRE-TIME", time.time() - start_time)
  13.  
  14. start_time = time.time()
  15.  
  16. step = 0
  17. for x_batch, y_batch in train_generator:
  18. step += 1
  19. if step > STEPS: break
  20.  
  21. print("TIME", time.time() - start_time)
  22.  
  23. curr_mem = psutil.virtual_memory().used
  24. print("Memory Used: %.2f GB" % ((curr_mem - start_mem) / GB))
  25.  
  26. # Release unused memory
  27. gc.collect()
  28. time.sleep(5)
Add Comment
Please, Sign In to add comment