import tensorflow as tf
from tensorflow import keras
from keras.models import load_model
from keras.preprocessing import image
import numpy as np
import cv2
import matplotlib.pyplot as plt
model=tf.keras.models.load_model('model_ex-024_acc-0.996875.h5')
img_array = cv2.imread('30.jpg') # convert to array
img_rgb = cv2.cvtColor(img_array, cv2.COLOR_BGR2RGB)
img_rgb = cv2.resize(img_rgb,(224,224),3)
plt.imshow(img_rgb) # graph it
plt.show()
model.predict(img_rgb)
ValueError: Error when checking input: expected input_1 to have 4 dimensions, but got array with shape (224, 224, 3)