Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created April 18, 2021 18:30
Show Gist options
  • Save AyishaR/b098e23b450539631256a715e089d1f3 to your computer and use it in GitHub Desktop.
Save AyishaR/b098e23b450539631256a715e089d1f3 to your computer and use it in GitHub Desktop.
# pick random test data sample from one batch
x = random.randint(0, len(Xtest) - 1)
output = model.predict(Xtest[x].reshape(1, -1))[0]
pred = np.argmax(output)
print("Predicted: ", pred, "(", output[pred], ")")
print("True: ", np.argmax(np.array(ytest)[x]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment