Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ''' client to produce generator images from latent space '''
  2. import numpy as np
  3. from keras.models import load_model
  4.  
  5. MODEL = './generator_model_2800.h5'
  6.  
  7. z_noise = np.random.randn(100*25)
  8. z_noise = z_noise.reshape(25, 100)
  9.  
  10. model = load_model(MODEL)
  11. X = model.predict(z_noise)
  12. X = (X+1) / 2.0
  13.  
  14. plt.imshow(X[4])
  15.  
  16. # show multiple designs
  17. shoe_index = 0
  18. fig, ax = plt.subplots(4, 4, figsize=(11, 11))
  19. fig.subplots_adjust(hspace=0, wspace=0)
  20. for i in range(4):
  21. for j in range(4):
  22. ax[i, j].imshow(X[shoe_index])
  23. ax[i, j].axis('off')
  24. shoe_index += 1
  25. plt.tight_layout()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement