%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 is a image scaling issue. The input to the imshow() expects it to be in the 0-1 range, while you are passing it a [0-255] range input. Try to view it as:
plt.imshow(x/255.)