Skip to content

Instantly share code, notes, and snippets.

Created February 26, 2020 07:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
# import skimage and matplotlib and random
from skimage import io
import matplotlib.pyplot as plt
%matplotlib inline
import random
# function to display image
def show(idx, title):
plt.title('\n\n{}'.format(test_labels[idx]), fontdict={'size': 16})
# generate a random index
r = random.randint(0,len(test_images)-1)
print("Random Number Generated: ", r, "Image Label : ", test_labels[r])
show(r, 'Image: {}'.format(test_images[rando]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment