I’m trying to understand the Vgg16 model from lesson 1. In order to do so I edited the given code a little.
The original script plots the cats and dogs images with the class labels by using ‘plots’ from ‘utils’.
I tried to port that code snipped to matplotlib, but the image looks solarized. For example if I got two images loaded in a numpy array it has dimensions (2, 3, 300, 300).
Now, if I want to output an image with ‘matplotlib’ using ‘imshow’ I have to reshape the array first or else I get an error that the dimensions are wrong.
plt.imshow(np.rollaxis(imgs, 0, 3))
The problem with the code above is that the image looks solarized. How can I fix this?