Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created January 16, 2021 17:56
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 AyishaR/0a6eefecb3020c206a92d67e3c6f2c77 to your computer and use it in GitHub Desktop.
Save AyishaR/0a6eefecb3020c206a92d67e3c6f2c77 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 = (output>0.5).astype('int')[0] # finding category
print("Predicted: ", pred, "(", output[0], "-->", pred, ")")
print("True: ", ytest[x][0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment