Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import matplotlib.image as mpimg
- import numpy as np
- # Visualizations will be shown in the notebook.
- %matplotlib inline
- methods = ['nearest', 'gaussian']
- np.random.seed(0)
- for samples in X_train():
- random_image = random.choice(samples)
- fig, axes = plt.subplots(3, 6, figsize=(12, 6),
- subplot_kw={'xticks': [], 'yticks': []})
- fig.subplots_adjust(hspace=0.3, wspace=0.05)
- for ax, interp_method in zip(axes.flat, methods):
- ax.imshow(random_image, interpolation=interp_method, cmap='viridis')
- ax.set_title(interp_method)
- plt.imshow()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement