Skip to content

Instantly share code, notes, and snippets.

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
You can’t perform that action at this time.