Skip to content

Instantly share code, notes, and snippets.

@mjbhobe
Created September 23, 2018 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjbhobe/ad00b2a2119f0b5061191bfb42c1bdc5 to your computer and use it in GitHub Desktop.
Save mjbhobe/ad00b2a2119f0b5061191bfb42c1bdc5 to your computer and use it in GitHub Desktop.
# let's pick 20 random values from the test data
rand_idx = np.random.randint(0, test_data.shape[0],20)
rand_images = test_data[rand_idx]
rand_labels_true = test_labels_cat[rand_idx]
# decode the labels (reverse on-hot encoding)
y_true = np.argmax(rand_labels_true, axis=1)
y_true
# predictions
y_pred = np.argmax(kr_base_model.predict(rand_images), axis=1)
y_pred
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment