Error while trying to test my model (shapes mismatch)

I’ve tried to finetune using the VGG16 class, and after that, i save both the model in json and the learnt weights, to load them later and classify new images in production, but i couldn’t yet use the model with a single image
my code is as follows:

img = cv2.imread(root + ‘/’ + file)
img = cv2.resize(img,(244, 244))
im =
im = np.asarray(im,dtype=np.uint8)
img = np.expand_dims(img,axis= 0)
img = np.vstack((img,img))
#print vgg.predict(img[np.newaxis,:,:,:])
print vgg.model.predict(img,batch_size = 2)

Unfortunately i always receive this error, i tried to feed the img after np.expand_dims directly to the model, but still couldn’t make it work, does any one have any clue about that?

Sorry guys, I’ve been on this error for two days, and i was thinking that the problem is with batch size, and i’ve just discovered that there’s a mismatch in the image size, but i didn’t notice it.

sorry for that, thank you.