Guest User

Untitled

a guest
Jul 17th, 2020
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. fig, ax = plt.subplots(figsize=(5, 5))
  2.  
  3. def plot_generated_images_draw(...):
  4.  
  5.     plt.clf()
  6.     for i in range(generated_images.shape[0]):
  7.         plt.subplot(dim[0], dim[1], i + 1)
  8.         plt.imshow(generated_images[i], cmap='gray_r')
  9.         plt.axis('off')
  10.     if epoch == 1 or epoch % 5 == 0:
  11.         plt.savefig('gan_generated_image_epoch_%d.png' % epoch)
  12.     plt.pause(0.1)
Add Comment
Please, Sign In to add comment