Skip to content

Instantly share code, notes, and snippets.

@RishiRajak
Created July 12, 2021 16:01
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 RishiRajak/e98dd159fe3aac965e088bcf2e2f6560 to your computer and use it in GitHub Desktop.
Save RishiRajak/e98dd159fe3aac965e088bcf2e2f6560 to your computer and use it in GitHub Desktop.
def get_predictions(n):
image1= validgen[0][0][n]
plt.imshow(image1)
input_arr = ks.preprocessing.image.img_to_array(validgen[0][0][n])
input_arr = np.array([input_arr]) # Convert single image to a batch.
predictions = model_com01[0].predict_classes(input_arr)
return predictions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment