Created
August 15, 2018 19:12
-
-
Save mjbhobe/cda626ca3941de7682bd1226f082ba4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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] | |
# one-hot-decode the labels (reverse on-hot encoding) | |
y_true = np.argmax(rand_labels_true, axis=1) | |
print(y_true) | |
# predictions | |
y_pred = np.argmax(kr_base_model.predict(rand_images), axis=1) | |
print(y_pred) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment