Skip to content

Instantly share code, notes, and snippets.

@kamal2230
Created October 11, 2020 07:37
  • 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
Save kamal2230/05cfb1062b27c6341771d5b54799eaa6 to your computer and use it in GitHub Desktop.
v = random.randint(0, 25)
sample_test = test_df.iloc[v:(v+18)].reset_index(drop = True)
sample_test.head()
plt.figure(figsize=(12, 24))
for index, row in sample_test.iterrows():
filename = row['Image']
category = row['Label']
img = load_img(validation_dir + filename, target_size = (150, 150))
plt.subplot(6, 3, index + 1)
plt.imshow(img)
plt.xlabel(filename + ' ( ' + "{}".format(category) + ' )' )
plt.tight_layout()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment