Skip to content

Instantly share code, notes, and snippets.

@dipanjanS
Created August 15, 2019 09:15
Show Gist options
  • Save dipanjanS/f9c1eb92c91bcb0cdd84f540a486fa55 to your computer and use it in GitHub Desktop.
Save dipanjanS/f9c1eb92c91bcb0cdd84f540a486fa55 to your computer and use it in GitHub Desktop.
# load and pre-process cat image
IMAGE_PATH = './cat2.jpg'
img = tf.keras.preprocessing.image.load_img(IMAGE_PATH, target_size=(299, 299))
img = tf.keras.preprocessing.image.img_to_array(img)
# view the image
plt.imshow(img/255.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment