import tensorflow as tf from tensorflow.keras.applications import VGG16 image = tf.keras.preprocessing.image.load_img('image.jpg', target_size=(224, 224)) image = tf.keras.preprocessing.image.img_to_array(image) image = tf.keras.applications.vgg16.preprocess_input(image) vgg_model = VGG16(weights='imagenet', include_top=False) features = vgg_model.predict(np.expand_dims(image, axis=0)) __ __