I am trying to get the images from a list of predictions called 'classes'
classes = model.predict(test_set)
and to match the result with the picture, I am finding a little troubling to do. Below is what I have done to try and show the images with the result.
location = 2 #Iterate through list of predictions.
print(categories[np.argmax(classes[location])]) #Shows result from prediction
plt.figure()
plt.imshow(test_set[location]) # Shows image
The error I get doing this is: "could not broadcast input array from shape (32,224,224,3) into shape (32,)" if I do
plt.imshow(classes[location]) # Shows image
then I get: TypeError: Invalid shape (2,) for image data