Skip to content

Instantly share code, notes, and snippets.

@AyishaR
Created February 5, 2021 12:52
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/8f4045d735ba793028a215b714e873d7 to your computer and use it in GitHub Desktop.
Save AyishaR/8f4045d735ba793028a215b714e873d7 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][0]
pred = (output>0.5).astype('int')
print("Predicted: ", pred, "(", output, "-->", pred, ")")
print("True: ", np.array(ytest)[x][0])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment