Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import matplotlib.image as mpimg
  3. import numpy as np
  4. # Visualizations will be shown in the notebook.
  5. %matplotlib inline
  6.  
  7. methods = ['nearest', 'gaussian']
  8. np.random.seed(0)
  9.  
  10. for samples in X_train():
  11. random_image = random.choice(samples)
  12.  
  13. fig, axes = plt.subplots(3, 6, figsize=(12, 6),
  14. subplot_kw={'xticks': [], 'yticks': []})
  15. fig.subplots_adjust(hspace=0.3, wspace=0.05)
  16.  
  17. for ax, interp_method in zip(axes.flat, methods):
  18. ax.imshow(random_image, interpolation=interp_method, cmap='viridis')
  19. ax.set_title(interp_method)
  20.  
  21. plt.imshow()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement