Uncaught Error: Error When Checking : Expected Conv2d_input To Have 4 Dimension(s), But Got Array With Shape [275,183,3]
I performed following operations on the images before training my keras model: for img in os.listdir(path): # convert to array img_array = cv2.imread(os.path.join(path,
Solution 1:
It is related to a mismatch of the dimension of the input of the model and the dimension of the image passed in as parameter to the predict method.
One might consider reshaping the image the following way:
imageTensor.reshape([-1, 50, 50, 3])
Post a Comment for "Uncaught Error: Error When Checking : Expected Conv2d_input To Have 4 Dimension(s), But Got Array With Shape [275,183,3]"