%matplotlib inline from keras.preprocessing import image import matplotlib.pyplot as plt import numpy as np img = np.random.rand(224,224,3) plt.imshow(img) plt.show()
This question is kind of old, but there is a very comfortable way to display images:
tf.keras.preprocessing.image.array_to_img(image[0]).show()
Your image has to have 3 dimensions (if its in a batch as normally, just take desired_element). Works fine on EagerTensors or numpy arrays.